Update query.rb

Do not invalidate for operators that only need one of several values to be non-blank.