NPE when extending a configuration defined in another project

I am able to trigger a NullPointerException in gradle when a project tries to extend the configuration of another subproject.
The following minimal build.gradle file triggers it:

project(':A') {
  configurations { aConfig }
  dependencies { aConfig fileTree('lib') }
}
project(':B') {
  configurations {
    bConfig.extendsFrom(project(':A').configurations.aConfig)
  }
  task crash { doLast { configurations.bConfig.each{} } }
}

I crashes due to a NullPointerException in AbstractModuleDescriptorBackedMetaData.java.

Validated on gradle 2.4 nightly, 2.3 and 2.2.1.

Extending configurations from other projects isn’t officially supported. See the development mailing list thread below. What exactly are you trying to accomplish by doing this? Perhaps there is a better solution.

https://mail.google.com/mail/u/1/#search/extend+configuration+from+another+project/14b2d315c6842a0e

I’ve gone head and raised this issue as GRADLE-3277.