Small tweak to `groupby` to improve it for "real-world" data

Benchmarks have a tendency to use data that is pathologically perfect.
In such pathological cases, it was unclear whether the current or previous
implementation would be preferred.  However, when the input data gets
shuffled, the implementation in this commit is *clearly* superior.
Therefore, I believe this is the best implementation for *real* data.