Fix a crash when adding a new menu during a menu:on_finished() event.