segments: fix double segdef bug