Query engine: Changes to allow users specify active condition for a given form and use it in queries. Intersection operator fixes