test(search): Correct test condition (fixes #4993)