Fix menu throwing an exception when a parent menu item does not exist

refs #3759