The "unlazy" construction of the query spaces is probably a solid way forward, and at first glance it would solve the double iteration problem.