As Relocate code temporarily removes some linked IDs from Main, this can make collection hierarchy data invalid, in a way that will break `BKE_main_collections_parent_relations_rebuild`. For now, simply move that call outside of `BLO_library_link_end` and do it after adding back all linked IDs to main. Pull Request: https://projects.blender.org/blender/blender/pulls/135936