When you load the initial content index, you only have the top-level list of resources that that container holds; however, this pattern could continue conceivably on forever (with a container holding a container holding a container, etc.).

This handles recursively adding all of those nested items to their appropriate containers.  This is one of the methods helping to ensure that any reference to a medium is pointing to the same medium throughout the app.