Instances detached after moving components into a set with variants

Hello,

I am updating our company’s design system for creating ad mockups so that it’s easier to use. I’ve been consolidating existing components into a component set with variants. This means I’ve been renaming the components so that properties are created when I turn them into a set. The original components were nested, so there was a master component instance inside each component. I detached the master component instances when creating the sets.

Someone accidentally published these changes early, and I’ve noticed that existing instances of these components in other files have detached. I could restore a previous version, but I’m trying to avoid having to redo 5 hours of tedious work that I did after the library was published.

Based on the info above, why did the instances detach? Is it because I renamed the components, or because of the nested components that I detached? Would restoring a previous version undo the library published changes?