might be better for potential future use to do this:

````
case 0:
    return null;
case 1:
    return moms.iterator().next();
default:
    return new FlattenedCompositeModuleOptionsMetadata(moms);
````

This would avoid the "should never happen" default which doesn't seem right IMO.