Fix repeated field copy loop