Fix multicondition query

Fix case when multi-condition query returns result, even if one of conditions is invalid