fixes #2332 workaround for broken search due to STI changes

I've tried breaking down the search definiton according to the actual class but it seems they are completely ignored on the child object.