search: add test for earlier fix in commit 1e1183a8bf0

Change-Id: I95c0f885079de17cd1c52b9ad40861c96eb5308c