flatten: remap successors/predecessors

* graph: avoid creating intervals for instructions without output