Fixed a BIG bug in Curve. An invalid iterator was dragged all the way
through almost all the internal functions of the class.
I'm actually surprised it didn't ring any alarm on unix platforms!