57805658 fix search in multithreading environment

A spec is still failing, but that is not related to this fix.