Fix an assert when we stop the search