Fix bug when rerouting the last segment after remove it's associated point.