Simplify grouped data in do.
Closes #387. Closes #388