When Node export is configured to create a new revision when importing a node that already exists, and this node has a menu, the menu entry is created again.
Here is how to replicate:
- Create node (on site A) and attach it to the main menu.
- Export the node
- Configure Node export (on site B) to create new revisions and to not reset the menu for the content type
- On site A edit the node and export it again
- On site B import the node again.
- A new revision will have been created and a duplicate menu is added.
As far as I can see, this is because the menu item in the menu always has 'mlid' set to 0 when the node is imported. menu.module uses this value to check if a new menu_link should be created by running an sql query with the mlid value (menu.module around line 3027).
To fix this Node export should, in case when a new revision is created, somehow restore the mlid value to the original value.