Added a way to access parent template instance.