prevent unreachable menu items to be added to the menu