correctly handle transitive deps