Make sure the submenu handler is only ran when submenus are matched