Normalize profiles before excluding; fixes #1267.

Note that :dev, :test, and :base still belong in the pom, but with
dependencies/paths scoped as <test>.