Minor QueryExpr refactoring