Fix crashing bug with handle_nested_views iteration