Updated the Segment adding algorithm so that multiple routes on the same
segment will be added correctly.