       (if (empty? cs)
         (let [simple-succs (->> (map (fn [[src edges]]
                                        [src
-                                        (into #{}
-                                              (map #(get-in
-                                                     block-classes [(:dest %)])
-                                                   edges))])
+                                        (set (map #(get-in
+                                                    block-classes [(:dest %)])
+                                                  edges))])
                                      succs)
                                 (into {}))
               all-succs (reduce set/union (vals simple-succs))

    (if (empty? nodes)
      crossings
      (let [node (first nodes)
            dest-set (into #{} (map :dest (get succs node)))
            dests (filter #(contains? dest-set %) minus-qs)
            c (count-sub-crossings-single-node node dests characters)]
        (recur (rest nodes) (+ crossings c))))))

  aligned blocks"
  [cm-graph]
  (let [{:keys [layers succs preds marked crossings characters]} cm-graph
        cm-layers (vec (map OrderedLayer->FlatLayer layers))
        [aboves belows] (apply map merge (map neighborify cm-layers))
        [top-idxs bot-idxs] (apply map merge (map indexify cm-layers))]
    (map->FlatGraph {:layers cm-layers
