[AS7-6497] Clean up transitive dependencies in build module