BUG: fix for GH14252
- [x] closes #14252 
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

This should fix #14252 .  It's possible that not every one of these changes is needed, or there is a better way to fix it, but I think this should do it.
