I'm actually fixing the exact same issue right now, this is an issue with how SharePoint picks the default ContentType of a document when you upload it.
When you upload a document to a DocumentSet SharePoint sets the ListItem ContentType to whatever the default ContentType for the List, this happens even if that ContentType in not valid in your DocumentSet. you can check if it's not valid by trying to change ContentTypes in the Editform page, if you change ContentTypes the default invalid value will no longer be present in the ContentTypes drop down
A solution i came up with for this is to create an EventReciever that detects if a new ListItem in in a documentSet and validates that it's ContentTypeID exists in yourDocumentSet.ContentTypeTemplate.AllowedContentTypes, if it does not simply change the listItem's ContentTypeID to the first Availible valid ContentType.
An alternative solution that doesn't work for your specific problem but may work for others people is to set the default Document ContentType in a given list to one that will be valid for all DocumentSets in the list.
Edit: here's a code solution using an event receiver. we need to catch itemUpdated for file overwrites. All we do is see if the document is inside a documentSet and has an invalid contenttype, if so we change the content type to the first available one in the document set.
public override void ItemAdded(SPItemEventProperties properties)
{
try
{
this.EventFiringEnabled = false;
UpdateItemCT(properties);
}
finally
{
this.EventFiringEnabled = true;
}
base.ItemAdded(properties);
}
public override void ItemUpdated(SPItemEventProperties properties)
{
if (properties.AfterProperties["vti_contenttag"] != null) return;
try
{
this.EventFiringEnabled = false;
UpdateItemCT(properties);
}
finally
{
this.EventFiringEnabled = true;
}
base.ItemUpdated(properties);
}
public void UpdateItemCT(SPItemEventProperties properties)
{
DocumentSet documentSet = DocumentSet.GetDocumentSet(properties.ListItem.File.ParentFolder);
if (documentSet != null)
{
if (documentSet.ContentTypeTemplate.AllowedContentTypes.Count > 0)
{
bool isValidCt = false;
SPContentTypeId defaultId = SPContentTypeId.Empty;
foreach (SPContentTypeId ctId in documentSet.ContentTypeTemplate.AllowedContentTypes)
{
if (ctId == properties.ListItem.ContentTypeId)
{
isValidCt = true;
break;
}
if (defaultId == SPContentTypeId.Empty)
{
defaultId = ctId;
}
}
if (!isValidCt)
{
properties.ListItem["ContentTypeId"] = defaultId;
properties.ListItem.SystemUpdate(false);
}
}
}
}