Fix the unbounded check for merge