add transaction to prevent intermediary crash if parent menu_item has been destroyed by another simulatnous generation (#1769)