fixed bug concearning escaping of aliased subqueries