Fix pattern match on buildLoaders.

Fixes #1341 
Review by @eed3si9n