fixed a loop/reduce bug in GroupByReducePipe.