changed aposGroupByArray to a private function that lives under aposLocals. There is no reason for it to be exposed  since it should only ever be used by aposGroupBy.