Added possibility to perform subqueries in exists and in clauses using closures