Fix bug when all deps are back edges.
Fix bug when all deps are back edges.

- Happened with the graph for SAMRAI

mfherbst/spack,TheTimmy/spack,EmreAtes/spack,TheTimmy/spack,iulian787/spack,skosukhin/spack,EmreAtes/spack,LLNL/spack,LLNL/spack,mfherbst/spack,lgarren/spack,matthiasdiener/spack,EmreAtes/spack,mfherbst/spack,krafczyk/spack,EmreAtes/spack,lgarren/spack,lgarren/spack,tmerrick1/spack,lgarren/spack,krafczyk/spack,matthiasdiener/spack,lgarren/spack,krafczyk/spack,matthiasdiener/spack,tmerrick1/spack,tmerrick1/spack,TheTimmy/spack,iulian787/spack,LLNL/spack,LLNL/spack,matthiasdiener/spack,iulian787/spack,tmerrick1/spack,iulian787/spack,TheTimmy/spack,mfherbst/spack,iulian787/spack,krafczyk/spack,mfherbst/spack,EmreAtes/spack,matthiasdiener/spack,TheTimmy/spack,LLNL/spack,skosukhin/spack,skosukhin/spack,skosukhin/spack,skosukhin/spack,krafczyk/spack,tmerrick1/spack