Backport PR #43251 on branch 1.3.x (Bug in RangeIndex.where raising AssertionError when result is not from RangeIndex)
Backport PR #43251: Bug in RangeIndex.where raising AssertionError when result is not from RangeIndex