BUG: groupby agg raising when column was selected twice
- [x] closes #44924
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry


Not exactly sure where to put the test

> Not exactly sure where to put the test

is fine where you have it (that said that file is getting kind of long) thanks @phofl 