fix sorting of groups - need to make sure sorting on the data object, or it could find data in any of the grouped results (which would also be pretty poor performing)