Fix parse_kv invocation in group_by to use imported name

Fixes #2277.