Handle nesting in group-by/collapse.
Make parse-groups private
Add a test for nested collapsing