container_toplevel_ancestor
This allows us to not have to explicitly write the same while loop everywhere.