Thanks Kovid, that now works. I think I have the code changes figured out for my "static" menu plugins now, obviously I will have to wait for the next Calibre release before I can get someone to verify it.
Next on the list I need to work through the dynamic based ones like Search the Internet, where I have the extra complication of unregistering shortcuts for actions that no longer exist when the menu is rebuilt. What could possibly go wrong...