InvalidWrapperException after programmatically deleting ISimNode

We use a reference robotic cell from which we delete certain elements to generate various cell configurations. However, after generating the cell the 3D viewport becomes unuseable with the following call stack:

Unhandled exception occurred:VisualComponents.Create3D.InvalidWrapperException: Wrapper being used has been invalidated.
   at VisualComponents.Revolution.TextFeatureWrapper.get_IsFloating()
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   at VisualComponents.UX.Shared.FloatingPositionHelper.UpdatePositionsAll()
   at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   at VisualComponents.Revolution.CameraWrapper.raise_PropertyChanged(Object value0, PropertyChangedEventArgs value1)
   at VisualComponents.Revolution.CameraWrapper.Rotate(Point lastPoint, Point currentPoint)
   at VisualComponents.UX.Input.RotateHandler.Delta(ManipulationEventArgs e)
   at VisualComponents.UX.Input.MouseGestureHandler.OnMouseMove(Object sender, MouseEventArgs e)
   at VisualComponents.UX.Input.HelperViewport.OnMouseMove(Object sender, MouseEventArgs e)
// shortened call stack

The code that deletes the nodes looks like this:

if (Component.FindNode(nodeName) is ISimNode nodeToDelete)
{
    nodeToDelete.Delete();
}

Are there some extra steps that are missing to ensure the nodes are safely deleted?

Are you using a very old version of VC? I think that exception was fixed around year 2020.

We’re on 4.2, I’m not sure we’re planning on updating anytime soon.

So I’ve tried our tool on VC4.9.2 and the issue is indeed fixed, thanks!