compile: BuildOrder: properly handle local dependencies.