Improve alias handling in group by transformation #465