Fix bug where searching would trigger documentation view.

Fix the bug I mentioned in the previous pull request :)