small bug fix in edge calculation

updated to not report duplicate edges. guards against underlying data
that isn’t de-duplicated