Return group_by permutations for flattened data

The `Scenario: flattened queries are shifted to the first non-zero _count` behavioural test has been removed, pending discussion of whether we need to keep the current range shifting behaviour.