(#20581) Correct parser future's validation of query expression

The QueryExpression validation was performing validation by
checking if the query vas an r-value. It should check if the query
expression is a valid query. 

This corrects this (probable) copy/paste error.
Merge pull request #1635 from hlindberg/issues/fix-20581

(#20581) Correct parser future's validation of query expression