Added ability to specify a scoped session when defining ConstructQuery.