Fix groupBy for MapDS