When you use two menus where the second extend the first, menu items and menu links aren't correctly propagated.
The menu items and menu links presents on the second menu already have the first menu on their model.
****
<menu name="FirstMenu" extends="CommonInlineBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
<menu-item name="MyItem">
<link target="GoAction"/>
</menu-item>
</menu>
<menu name="SecondMenu" extends="FirstMenu"/>
****
The result, if during the rendering some information are generated from the menu, in the previous case, it's always the "FirstMenu" that would be use.
Like when your menu generate a hidden-form, the SecondMenu link the bad form
****
<form method="post" action="GoAction" onsubmit="javascript:submitFormDisableSubmits(this)" name="SecondMenu">...</form>
<a href="javascript:ajaxSubmitFormUpdateAreas('FirstMenu', 'xxx')">MyItem</a>
****
To solve it and don't break the thread safe pattern, I introduce two new constructor for ModelItem and MenuLink for duplicate the ModelMenuItem and MenuLink in memory with the new parent. With this, the SecondMenu iw now completely duplicated on memory and now share any reference with the extended menu.
Thanks to Marco Rodrigues that detect this problem