Fix mishandling of the infinite loop case when merging two blocks. This