What was the source version of the sites?
This issue occurred only on upgraded versions or, when importing from an older version which had some inconsistent UI elements IDs.
Anyway, you can use this SQL script
to remove the duplicates (for DB version 6 only
). Please, be sure you have actual backups of the DB since the script can also remove something which is OK in your setup (the script will consider the ID as duplicate but it might not be it in your DB).