BUG: Groupby filter maintains ordering, closes #4621
Merge pull request #5222 from danielballan/filter-maintains-ordering

BUG: Groupby filter maintains ordering, closes #4621