Fixed a bug in the compiler that caused problems with loop not being referenced in an outer scoped.  (Introduced in the last checkin)

--HG--
branch : trunk
diff --git a/jinja2/compiler.py b/jinja2/compiler.py
index ad7857d..4c0944a 100644
--- a/jinja2/compiler.py
+++ b/jinja2/compiler.py
@@ -909,7 +909,8 @@
 
         # make sure the loop variable is a special one and raise a template
         # assertion error if a loop tries to write to loop
-        loop_frame.identifiers.add_special('loop')
+        if extended_loop:
+            loop_frame.identifiers.add_special('loop')
         for name in node.find_all(nodes.Name):
             if name.ctx == 'store' and name.name == 'loop':
                 self.fail('Can\'t assign to special loop variable '