v.22.8Bug Fix

Do Not Optimize Functions in GROUP BY Statements that Shadow Table Columns

Do not optimise functions in GROUP BY statements if they shadow one of the table columns or expressions. Fixes #37032. #39103 (Anton Kozlov).