only iterate over segments containing units in activeSegments()