Template Mismatch during attachment. Attaching instanced component to template component

Try this: https://forums.unrealengine.com/t/ue5-template-mismatch-during-attaching-of-instanced-component/1510733/2

I had a custom SceneComponent that would break when a Blueprint inherited from a Blueprint that had my component. I was able to fix it by following that thread.

I wanted to attach a couple StaticMeshComponent to my custom SceneComponent.

Constructor:
StaticMeshComponent1->SetupAttachment(this);
StaticMeshComponent0->SetupAttachment(this);

OnRegister:
Super::OnRegister();
this->StaticMesh1->AttachToComponent(this, FAttachmentRules::KeepRelativeTransform);
this->StaticMesh0->AttachToComponent(this, FAttachmentRules::KeepRelativeTransorm);