Fix searching for test records CRM-12610