Search: fixed bug introduced in recent PR #900, related to comment on #909