BUG: Fix issue with inserting duplicate columns in a dataframe (#14291)
- [x] closes #14291
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

Resubmitting PR (@jorisvandenbossche)
