DependencyGraph: Auto rename nested files. (#774)

Fixes #774.