Fix groupingGroupBy to group correct if the dattype was local