Fix for alias reference in group by or order by for an index table (issue #416)