includeBuild causes circular task dependency?

I am experimenting with migrating from build script plugins to the includeBuild style, similar to how Gradle itself and junit5 organize their build conventions. Unfortunately, simply adding an empty declaration results in an error claiming a circular task dependency.

// settings.gradle
includeBuild("gradle/plugins")
// gradle/plugins/settings.gradle
// empty
$ gradle build -m --no-build-cache -q

FAILURE: Build failed with an exception.

* What went wrong:
Circular dependency between the following tasks:
:caffeine:classes
\--- :caffeine:compileJava
     +--- :caffeine:generateLocalCaches
     |    +--- :caffeine:compileJavaPoetJava
     |    |    \--- :caffeine:jar
     |    |         +--- :caffeine:classes (*)
     |    |         +--- :caffeine:codeGenClasses
     |    |         |    \--- :caffeine:compileCodeGenJava
     |    |         |         +--- :caffeine:classes (*)
     |    |         |         +--- :caffeine:compileJava (*)
     |    |         |         \--- :caffeine:jar (*)
     |    |         +--- :caffeine:compileCodeGenJava (*)
     |    |         \--- :caffeine:compileJava (*)
     |    \--- :caffeine:javaPoetClasses
     |         \--- :caffeine:compileJavaPoetJava (*)
     +--- :caffeine:generateNodes
     |    +--- :caffeine:compileJavaPoetJava (*)
     |    \--- :caffeine:javaPoetClasses (*)
     \--- :caffeine:jar (*)

(*) - details omitted (listed previously)

To debug, I tried to remove various steps in hopes of finding the culprit, but at a minimal (non-functional) build it still has a dependency that I cannot explain,

Circular dependency between the following tasks:
:caffeine:classes
\--- :caffeine:compileJava
     \--- :caffeine:jar
          +--- :caffeine:classes (*)
          \--- :caffeine:compileJava (*)

I am using 8.1-rc-3 and if I downgrade to 8.0.2 the problem persists.

Certainly there may be something that I am doing wrong, but the changing behavior for an empty included build is unclear and surprising.

I think that using this declaration works so I’ll retry my experiments.

// settings.gradle
pluginManagement {
  includeBuild("gradle/plugins")
}

The Gradle build uses includeBuild at the top-level and junit5 under pluginManagement.repositories, which is likely implicitly then the top-level scope. By moving the includeBuild in or out of the pluginManagement, I can reproduce and resolve this behavior. I noticed this after taking a fresh look and the Gradle docs which hint,

You may also use the includeBuild mechanism outside pluginManagement to include plugin builds. However, this does not support all use cases and including plugin builds like that might be deprecated in a future Gradle version.