Had been sorting dependencies in incorrect order: would guarantee type checking a file before its include dependency, causing an error.