Fixed inability group rows

Key columns were not being updated when sorted, so it always grouped
based on all key columns