Template mismatch during attachment. Attaching instanced component to template component

I explain the problem and suggest some solutions here. Hope this helps others, as I spent days on issues from nested components and decided to figure out what was really going on.

Shoutout to @zero.soul for his proper long-term solution on initializing nested components.