Problem with self-intersecting curve

I am trying to make a plugin that can trim off the excess of a self overlapping curve. I recently learned about Intersect.CurveSelf, but I’m having issues applying it in my plugin. Here is a picture:

(I should mention: the point at the start of the curve is under all those duplicated points)

The start and end points are fine, and the circle only overlaps once. So naturally, I’m assuming I would get 1 intersection point (I’m using a tolerance of .0001). However, I’m getting nine points. Here is my code:

Rhino.Geometry.Intersect.CurveIntersections events = CurveSelf(myCurve, 0.0001);

foreach (var event in events) {

How do I make this better?

Can you post a 3dm file with your sample geometry?

Sure, here it is:

Problem.3dm (32.0 KB)