Yes I was wrong, it can be before or after GROUP BY. Just checked, it is same on 7.3.4 as well.