Digging a bit deeper, it seems like this only applies when you have a rule that attempts to replace a project dependency with exactly the same dependency coordinates, using DependencyResolveDetails.useTarget().
In your example you are doing this with details.useTarget(details.requested):
configurations.all { Configuration conf ->
conf.resolutionStrategy { ResolutionStrategy rs ->
rs.eachDependency { DependencyResolveDetails details ->
details.useTarget(details.requested)
}
}
}
So I think we just need to add back a check so that if you specify the exact project coordinates in details.useTarget(), we retain the existing project dependency.