fixup! correctly track input columns for having clauses in group by queries