Small optimization of the query compiler