Handle subqueries better

Still executes them as separate queries though. But the results should
be properly handled now and compared using a array inclusion comparison.