Previously, when there were multiple curve points at the same or almost same position, the computed tangent was unpredictable.
Part of the issue was that normalize_and_get_length has a very low epsilon (it should probably use a relative epsilon instead of an absolute one for the case described there, but that's a separate topic).
Now, the handling of this case is more explicit, making it more predictable. In general, when there are duplicate points, it will just use tangents from neighboring points now.
Old:
New:
Obviously, there are still some shading artifacts when there are overlapping elements, but at least the tangents are more predictable now.

