Added temporary storeage of query on the layer instance so that the vector code can access the query