The material compiler currently doesn't warn about duplicate names in an .mtl file, but then the dupes get dropped on the floor when they're loaded and stored in a hash table.
Also, we don't currently do anything about unused materials. There are two parts to this: 1. clean up empty material ranges in meshes; 2. clean up materials in the library that are never referenced by any material range in the mesh.