BUG: fix KeyError with list of a single, missing, element
- [x] closes #27148
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

thanks @toobaz 