TemplateParser: replaced identity comparison with a proper call to isSameNode()