Fix grouping for data with missing fields


@pbadenski
@gtrogers