Recurse into subqueries to dig for nodes; thus the test gets a flat representation.
Use index for Sort: add more tests, more clever test data structures.