Proper way to resolve transitive modules with and without Scala variants

Perhaps you could use a component selection rule similar to here