more thread safety in LRUCache

--HG--
branch : trunk
diff --git a/tests/test_inheritance.py b/tests/test_inheritance.py
index 34e5738..114ec9c 100644
--- a/tests/test_inheritance.py
+++ b/tests/test_inheritance.py
@@ -93,3 +93,8 @@
 
 def test_working(env):
     tmpl = env.get_template('working')
+
+
+def test_reuse_blocks(env):
+    tmpl = env.from_string('{{ self.foo() }}|{% block foo %}42{% endblock %}|{{ self.foo() }}')
+    assert tmpl.render() == '42|42|42'