ChainCompile: Better dependency traversal.
Commented code for later improvements.