Fix subquery output alias when its own output is a constant