triple entries in mm table when copying page
In an extbase extension I have two different record types which have a mm-relation to each other, i.e. "maps" and "marker". There is a mm table tx_maptest_map_marker_mm.
Say you have a sysfolder in which is one map record and one marker record. They are related to each other. If you copy the sysfolder, 3 (!) new, but identical entries are added to the mm table. This only happens if you have set 'MM_opposite_field' in the marker TCA. If you don't set 'MM_opposite_field', everything works fine and only 1 entry is added to the mm table.
Tested with TYPO3 7.6.15 and PHP 5.6/7.0.
See also attached example extension, which was mostly created with EXT:extension_builder.