Changed graph generation so that preserved resources are considered.
This is particularly useful in the context of Celf outputs, because in Celf, we cannot
consume persistent resources.