Previously we were using the current component to retrieve the template
instance, but what we actually want is the template instance of the
surrounding component that is a template.