Creating menus with menuItems in NoteListContextMenu

I ran into some strange behavior while I was developing a plugin and I wanted to see if this is expected or if I've found a bug of some kind. The issue involves adding new options to the NoteToolbar, NoteListContextMenu, and Tools menu.

The following code works:

// Add two buttons to the note toolbar
await joplin.views.toolbarButtons.create('noteRenameAlterButton', 'noteNameAlter', ToolbarButtonLocation.NoteToolbar);
await joplin.views.toolbarButtons.create('noteRenameReplaceButton', 'noteNameReplace', ToolbarButtonLocation.NoteToolbar);

// Add two menu items to the right-click context menu
await joplin.views.menuItems.create('noteRenameAlterContextItem', 'noteNameAlter', MenuItemLocation.NoteListContextMenu);
await joplin.views.menuItems.create('noteRenameReplaceContextItem', 'noteNameReplace', MenuItemLocation.NoteListContextMenu);

// Add a 'Note Rename' menu to the Tools menu, with 2 menu items
const menuItems = [{commandName: 'noteNameAlter'}, {commandName: 'noteNameReplace'}];
await joplin.views.menus.create('noteRenameToolsMenu', 'Note Rename', menuItems);

If I take the above code and change it so that I'm also creating a 'Note Rename' menu in the right-click context menu with two menu items, the NoteListContextMenu items will not appear, but it will also cause my NoteToolbar buttons to go missing:

// Add two buttons to the note toolbar
await joplin.views.toolbarButtons.create('noteRenameAlterButton', 'noteNameAlter', ToolbarButtonLocation.NoteToolbar);
await joplin.views.toolbarButtons.create('noteRenameReplaceButton', 'noteNameReplace', ToolbarButtonLocation.NoteToolbar);

// Add a 'Note Rename' menu to the Tools menu, with 2 menu items
const menuItems = [{commandName: 'noteNameAlter'}, {commandName: 'noteNameReplace'}];
await joplin.views.menus.create('noteRenameToolsMenu', 'Note Rename', menuItems);
// Do the same thing for the right-click context menu
await joplin.views.menus.create('noteRenameContextMenu', 'Note Rename', menuItems, MenuItemLocation.NoteListContextMenu);

The menu inside of the Tools menu still appears, but everything else is gone. Any idea why this happens? Am I missing something?