fixed search query caching bug introduced with commit 1bed97e4; fixes #278