What if the top level can override the transitive dependencies?
I have had to do that with Ruby apps, where libraries are also shared.