backport: use one NonClasspathDirectoriesScope instead of union of per-root scopes