Fix bug merging diff files. Bad loop condition caused trailing changes to be dropped.