Interesting. It doesn't work in MSSQL, and I understand that's correct (ie. isn't allowed) per the standard.
This is frequently unavoidable, though. Or more precisely: it could be avoided with a sane database design, but the databases on which I have to work for my day job are the precise opposite of "well-designed", so grouping on complex expressions is unfortunately an inevitability.
It's (IIRC!) something to do with the situation of
select x + y as x
from ...
group by x
which x are we talking about? (Logically that example is crap because only the alias x makes sense, but something like that anyway).