Fix duplicate headers being copied.