How to manage conflicts with duplicate dependencies (the same module gets defined twice)

A similar problem is described here:

It is impossible to use two applications/modules/dependencies that define/use the same name. This is intrinsic to the BEAM, as the name of a module is 1:1 with its identity.