Fix a potential crash when trying to find a better block match.