[V8i SS4 .878] System.InvalidCastException: Unable to cast object of type 'Bentley.Civil.Geometry.Model.PointEntity3d' to 'Bentley.Civil.Geometry.Model.LinearEntity3d'.

I'm putting together a terrain element to represent a loop corridor. This particular loop closes in upon itself, but there is some space between the limits of construction that the existing terrain may remain as is. So the fix is to construct a linestring, complex element, or region which will be used as a hole in the terrain element. In this pursuit, I've created an element that cannot be deleted without causing a crash.

I've been testing various methods to overcome this since I've encountered this sort of corruption before and I'd rather overcome it once and for all. (Also, I loathe the notion that I have to redo all of what I've already done in another file.) 

In this particular session of Geopak I thought it might be worth using the Analyze Point tool. Below is the error stack that resulted, and I wonder if this is important in diagnosing the problem.

************** Exception Text **************
System.InvalidCastException: Unable to cast object of type 'Bentley.Civil.Geometry.Model.PointEntity3d' to type 'Bentley.Civil.Geometry.Model.LinearEntity3d'.
   at Bentley.Civil.Geometry.Model.LinearEntity2dInPlan.get_ActiveLinearEntity3d()
   at Bentley.Civil.Commands.DTM.AnalyzePointDTM.get_ReferenceProfileEntity()
   at Bentley.Civil.Commands.DTM.AnalyzePointDTM.get_IsVerticalInfo()
   at Bentley.Civil.Commands.DTM.AnalyzePointDTM.OnEntryPropertyFilterCheck(String category, EntryDescriptor entry)
   at Bentley.Civil.Geometry.Command.GeometryCommand.DoEntryPropertyFilterCheck(String category, EntryDescriptor entry)
   at Bentley.Civil.Geometry.Command.GeometryCommand.GeometryManagedCommand.OnEntryPropertyFilterCheck(String category, EntryDescriptor entry)
   at Bentley.Civil.UI.Commands.ManagedCommand.CivilFilterProperty(String requestor, String controlType, String propertyEnabler, String category, String stateFileName, IECPropertyValue propertyValue, ECInstanceListSet instanceListSet)
   at Bentley.Civil.UI.Commands.ManagedCommand.Bentley.ECObjects.UI.IECPresentationFilter.FilterProperty(String requestor, String controlType, String propertyEnabler, String category, String stateFileName, IECPropertyValue propertyValue, ECInstanceListSet instanceListSet)
   at Bentley.ECObjects.UI.ECMultiInstancePropertyAdapter.FilterProperty(IECPropertyValue propertyValue, String categoryName)
   at Bentley.ECObjects.UI.ECMultiInstancePropertyAdapter.AddMemberProperties(IECValueContainer valueContainer, ECInstanceListSet objectSet, Int32 instanceNumber)
   at Bentley.ECObjects.UI.ECMultiInstancePropertyAdapter.AddPropertiesInInstanceList(ECInstanceList instanceList, ECInstanceListSet objectSet, Boolean differingInstanceLists)
   at Bentley.ECObjects.UI.ECMultiInstancePropertyAdapter.GetTypeDescriptors()
   at Bentley.Civil.UI.Controls.CatagorisedECControlCollection.InternalSetInstanceListSet()
   at Bentley.Civil.UI.Controls.CatagorisedECControlCollection.ReloadInstanceLists()
   at Bentley.Civil.UI.Controls.CatagorisedECControlCollection.OnReloadTimeout(Object sender, EventArgs eventArgs)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I tried loading only MicroStation (not Geopak), to delete the offending element, but it said it was a locked civil element. So I found this article https://communities.bentley.com/products/road___site_design/w/road_and_site_design__wiki/20328/how-do-i-remove-the-civil-feature-from-an-element which is not helpful as it also precipitates an exception.

I did find a solution, which was to delete the offending elements using steps from this article: https://communities.bentley.com/products/microstation/w/microstation__wiki/8837/deleting-levels.