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 {
  task crash { doLast { configurations.bConfig.each{} } }

I crashes due to a NullPointerException in

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.

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