Support "_nsubrecs" source with "groupBy" and "sortBy"