I believe that this is happening because of a problem within USubobjectDataSubsystem::FindOrCreateAttachParentForComponent where it is creating duplicates of the character mesh because the "TestSceneComponent" has not been created yet when the first Character mesh is made. Hopefully we can solve this by adding some more checks on the adding of subobjects to make sure there are no duplicate names.
Add the following header file to you project:
Add the following Cpp to your project:
1. Create a BP based on FooCharacter
2. Open the blueprint
Result: There are two "CharacterMesh" skeletal mesh components, one with an incorrect attachment.
Expected: there is only one skeletal mesh, and it is attached to the "TestSceneComp"
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-155798 in the post.