Refactoring hashCode/equals in TemplateContext implementations since the instances are overwriting each other. refs #459