Aggregator: fix undefined Set, reduce_groups code generator