Fix default query matching making global search look like AND. Closes #877.