Added testcase for a bug

--HG--
branch : trunk
diff --git a/tests/test_old_bugs.py b/tests/test_old_bugs.py
index a30c909..687d962 100644
--- a/tests/test_old_bugs.py
+++ b/tests/test_old_bugs.py
@@ -33,3 +33,23 @@
 def test_urlize_filter_escaping(env):
     tmpl = env.from_string('{{ "http://www.example.org/<foo"|urlize }}')
     assert tmpl.render() == '<a href="http://www.example.org/&lt;foo">http://www.example.org/&lt;foo</a>'
+
+
+def test_loop_call_loop(env):
+    tmpl = env.from_string('''
+
+    {% macro test() %}
+        {{ caller() }}
+    {% endmacro %}
+
+    {% for num1 in range(5) %}
+        {% call test() %}
+            {% for num2 in range(10) %}
+                {{ loop.index }}
+            {% endfor %}
+        {% endcall %}
+    {% endfor %}
+
+    ''')
+
+    assert tmpl.render() == ''