revert commit 956e8b6d8e12159f4a40ecbb7da96158feaddec6
Bug 974939 - Fix mixed up logic in the search query generator
1.1.16