BUG: Add test to ensure, that bug will not occur again. #33058
- [x] xref #33058
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Should I add a whatsnew entry? It's not really new, if it is backported to 1.0.1.