Error: Cannot make a Group a member of itself

While loading the diagram, I often face this issue which fails to render the diagram on the canvas but this is not happening all the time. I surprise why I can’t see this issue every time I try to load the diagram, populating the same model.
Can you please help me to figure out what the actual cause for this issue is.

I would look carefully at the model data to see if there are any cycles in the “group” membership references.

  { key: 1, isGroup: true, group: 1 }

That would not explain why you aren’t getting an error every time, unless maybe the error is being ignored/hidden sometimes.

EDIT: I checked the error message, and it happens when setting Part.containingGroup to itself. There is a different error message when the cycle is non-reflexive.