Calls can_be_viewed before processing the search

Fixes #59