[scheduling] Streamlined resource addition code in flow graph, and fixed the odd bug that sometimes would see no leaf arcs being set up to the sink.