improved logic in wp_nav_menu_objects