Fixed issue with local beam search terminating prematurely