[21.5] Fix assert in reverse search