driver: Don't lose track of nodes when we fail to resolve cycles
The nodes that take part in a cycle should include both hs-boot and hs files, but when we fail to resolve a cycle, we were only counting the nodes from the graph without boot files.
Fixes #24196 (closed)
Edited by Zubin