Fixed simplification bug in simplifyPathCurves.