Merge repeated tags.