The original code has two logics, extrude the end points or duplicate points (making new splines).
Duplicating points should not be part of the extrusion, this is already done with Shift + D for example.
The proposal here is to redo all the logic by extruding contiguous selected segments.
No more duplicate point.
Ref T47169
