Fixes .nth() with groupby multiple columns

Let me know if this makes sense

Problem mentioned in issue 8979 too
add the issue number in the comment as well