     while component.mixinParent()
       component = component.mixinParent()
 
-    Blaze.getData(component.templateInstance.view) or null
+    Blaze.getData(component._componentInternals.templateInstance.view) or null
 
   # Caller-level data context. Reactive. Use this to get in event handlers the data
   # context at the place where event originated (target context). In template helpers

    # and this is this dependency mixin, the view might already be created or rendered and callbacks were
    # already called, so we should call them manually here as well. But only if he view has not been destroyed
    # already. For those mixins we do not call anything, there is little use for them now.
    unless @templateInstance?.view.isDestroyed
      mixinInstance.onCreated?() if not @_componentInternals.inOnCreated and @templateInstance?.view.isCreated
      mixinInstance.onRendered?() if not @_componentInternals.inOnRendered and @templateInstance?.view.isRendered

    # To allow chaining.
    @

          @component = component

          # TODO: Should we support that the same component can be rendered multiple times in parallel? How could we do that? For different component parents or only the same one?
          assert not @component._componentInternals.templateInstance
          @component._componentInternals.templateInstance = @

          try
            # We have to know if we should call onCreated on the mixin inside the requireMixin or not. We want to call
            # it only once. If it requireMixin is called from onCreated of another mixin, then it will be added at the
            # end and we will get it here at the end. So we should not call onCreated inside requireMixin because then
