Fix pattern match on buildLoaders.

Fixes #1341
Merge pull request #1342 from sbt/wip/fix-build-loaders

Fix pattern match on buildLoaders.