Fix use-after-free

menu_settings_iterate() would strcmp freed labels after exiting
a submenu.