That’s most likely happening because your curve was not evenly divisible by the circles with that radius. Whenever you’re creating while loops, you have to always make sure that the end condition will be met, otherwise you’ll get stuck in an endless loop.
However, this is not easily done in Dynamo’s context, so it’s usually a good idea to test a chain of your custom node and see if it behaves as expected:
You can definitely build such a robust solution with just nodes, tho. Here’s a slightly more advanced example, that compares each new value to the last used value and passes a “false” bool if the new value stops increasing. That will make sure that even if the last circle does not intersect the curve, the iteration will stop and we won’t enter an infinite loop. I’m not gonna share it this time, because I want you to discover this on your own: