Bug: groupby multiindex levels equals rows
Fix for GH16843 where groubpy gives wrong result when number of
groupedby index+columns is equal to length of axis

 closes #16843
 tests added
 passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff`` (On Windows, ``git diff upstream/master -u -- "*.py" | flake8 --diff`` might work as an alternative.)
 - [ ] whatsnew entry
