I think this was solved as part of the Search 6 proof of concept groundwork, but we need to add tests.