         /// Describes a way in which a package layout is invalid.
         public enum InvalidLayoutType {
             case multipleSourceRoots([String])
-            case invalidLayout([String])
+            case unexpectedSourceFiles([String])
         }
     
     /// A module was marked as being dependent on an executable.

        if srcDir != packagePath {
            let invalidRootFiles = try directoryContents(packagePath).filter(isValidSource)
            guard invalidRootFiles.isEmpty else {
                throw ModuleError.invalidLayout(.invalidLayout(invalidRootFiles.map{ $0.asString }))
            }
        }
        

        if potentialModulePaths.count == 1 && potentialModulePaths[0] != srcDir {
            let invalidModuleFiles = try directoryContents(srcDir).filter(isValidSource)
            guard invalidModuleFiles.isEmpty else {
                throw ModuleError.invalidLayout(.unexpectedSourceFiles(invalidModuleFiles.map{ $0.asString }))
            }
        }
        
