TST: Added regression test case
Resurrection of #28966

- [x] closes #18549
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

off-topic @MomIsBestFriend if you're up for suggestions on things needing attention, in core.indexing L1983 is never reached in the tests and i _think_ it may be impossible, could use a fresh set of eyes to see if we can prove that hypothesis.  Also L892-901 is not reached, but i dont have a strong intuition for if that is possible. @jbrockmendel Sure!

I always like it when you give me tasks:)
I don't have a lot of knowledge, but I am willing to learn.

Thank you, means a lot :+1:  re-started azure Closing this, as this PR is giving me more headache than I expected.