[AS7-6580] Do not add transitive dependencies for server modules or user modules

Do not add transitive dependencies for server modules or user modules.