Fixed the support of inheritance in the SimpleContextClassGenerator

- Using late static binding to access a private property will trigger a
  fatal error if the class is extended as the method in the parent class
  will try to access a private property of the child class.
- Switching the visibility to protected while keeping the late static
  binding allows to overwrite the template in child classes.