Fixed a bug that caused syntax errors when defining macros or using the
`{% call %}` tag inside loops.

This fixes #323.

--HG--
branch : trunk
diff --git a/jinja2/compiler.py b/jinja2/compiler.py
index 0e74faf..8d605c7 100644
--- a/jinja2/compiler.py
+++ b/jinja2/compiler.py
@@ -551,7 +551,10 @@
             if name not in aliases:
                 to_delete.add('l_' + name)
         if to_delete:
-            self.writeline('del ' + ', '.join(to_delete))
+            # we cannot use the del statement here because enclosed
+            # scopes can trigger a SyntaxError:
+            #   a = 42; b = lambda: a; del a
+            self.writeline(' = '.join(to_delete) + ' = missing')
 
     def function_scoping(self, node, frame, children=None,
                          find_special=True):
diff --git a/jinja2/debug.py b/jinja2/debug.py
index 38fa012..bfd00f1 100644
--- a/jinja2/debug.py
+++ b/jinja2/debug.py
@@ -11,7 +11,7 @@
     :license: BSD.
 """
 import sys
-from jinja2.utils import CodeType
+from jinja2.utils import CodeType, missing
 
 
 def translate_exception(exc_info):
@@ -47,7 +47,7 @@
     else:
         locals = {}
     for name, value in real_locals.iteritems():
-        if name.startswith('l_'):
+        if name.startswith('l_') and value is not missing:
             locals[name[2:]] = value
 
     # if there is a local called __jinja_exception__, we get