anchor.diff:             (symbolp (car expr)))
         (let ((key (car expr)))
           (case key
  -          (:variable `(getf *template-data* ,(intern (string-upcase (second expr)) :keyword)))
  +          (:variable (let ((varkey (intern (string-upcase (second expr)) :keyword)))
  +                       (when (not (or (find varkey *local-variables*)
  +                                      (find varkey *template-variables*)))
  +                         (push varkey *template-variables*))
  +                       (intern (string-upcase (second expr)))))
             (otherwise (cons (symbol-from-key (car expr))
                              (iter (for item in (cdr expr))
                                    (collect (translate-expression backend item)))))))
  
positive.code: ;;;; Author: Moskvitin Andrey <archimag@gmail.com>
  
  (in-package #:closure-template)
  
  (defun write-template-string (str)
    (write-string str *template-output*))
  
negative.code:                             
  
  (defmethod translate-named-item ((backend common-lisp-backend) (item (eql 'closure-template.parser:template)) args)
    (let* ((*template-variables* nil)
           (body `(with-output-to-string (*template-output*)
                    ,(translate-item backend
                                     (cdr args))))
           (binds (iter (for var in *template-variables*)
                        (collect (list (find-symbol (symbol-name var) *package*)
                                       `(getf ^data^ ,var))))))
    `(defun ,(intern (string-upcase (caar args))) (^data^)
       (let (,@binds)
         ,body))))
  
  
  (defmethod translate-template ((backend (eql :common-lisp-backend)) template)
  