DependencySubstitution cannot handle every name for the project directory

We are investing big on moving a big Maven project to Gradle.
However we have an issue using the dependency substitution…

We have a dependency like ‘’, and it should not point to the library but to the local module we are working on, which follows the same naming as our dependencies, being qrscanning.
Beneath you can see the configuration that is not working. We tried qrscanning, qrc, certain dot notated names (that I cannot share not to reveal my customer), …

configurations.all {
    resolutionStrategy.dependencySubstitution {
        substitute module('') with project (':qrscanning')

Any clue why this isn’t working?
When I define the local project hard in my dependency list, Gradle does not complain. So it really has to do with the replacement itself.

This is the (obfuscated error): 
* What went wrong:
A problem occurred configuring project ''.
> Could not resolve all dependencies for configuration ''.
   > Module version, configuration '_debugCompileCopy' declares a dependency on configuration 'default' which is not declared in the module descriptor for

When change the local project’s directory to something like abc for instance it works. But I want to be free to choose my directories off course and to keep them the same as my libraries are named.

So for me this is a Gradle bug… However can someone tell me what the current ‘rules’ are so we can work around it for now?

I have tested this with Gradle 2.5, 2.7 and 2.8 RC1