BUG: Groupby filter maintains ordering, closes #4621