Fix register clobbering bug in overflow size check