As discussed, re-assigning to Timour, because testscase also shows problem with his fix for constant subqueries.
As discussed, re-assigning to Timour, because testscase also shows problem with his fix for constant subqueries.