WebJar CDN substitution only works for direct dependencies

Since the WebJar path calculation only uses `libraryDependencies` to find the group ids of webjars, the CDN substitution doesn't work for webjars that are transitive dependencies.