Actually, a unique name is passed by each and every menu action, but one final line of code was deleted somewhere along the line:
if not favourites_menu_unique_name: favourites_menu_unique_name = 'Library Codes'
That fall-through should never been executed, since a unique name is passed by each and every menu action.
Thanks for the catch.
DaltonST