Avoid unnecessary length check in merge