Use recursive grouping for multikey queries

@robyoung
@gtrogers