Chromosome rearrangements via template switching between diverged repeated sequences