fixed problems in refineGraphSE3Segment
(though it's not used now)