diff --git a/django/test/client.py b/django/test/client.py
index 348bfa7..5fc5877 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -3,6 +3,7 @@ from urlparse import urlparse, urlunparse, urlsplit
 import sys
 import os
 import re
+from copy import deepcopy
 try:
     from cStringIO import StringIO
 except ImportError:
@@ -84,7 +85,7 @@ def store_rendered_templates(store, signal, sender, template, context, **kwargs)
     Stores templates and contexts that are rendered.
     """
     store.setdefault('template', []).append(template)
-    store.setdefault('context', ContextList()).append(context)
+    store.setdefault('context', ContextList()).append(deepcopy(context))
 
 def encode_multipart(boundary, data):
     """
diff --git a/tests/regressiontests/test_client_regress/models.py b/tests/regressiontests/test_client_regress/models.py
index be2cb8f..973bf75 100644
--- a/tests/regressiontests/test_client_regress/models.py
+++ b/tests/regressiontests/test_client_regress/models.py
@@ -498,6 +498,25 @@ class ContextTests(TestCase):
         self.assertEqual(response.context['request-foo'], 'whiz')
         self.assertEqual(response.context['data'], 'bacon')
 
+    def test_subcontext(self):
+        "Context variables can be retrieved from subcontexts"
+        response = self.client.get('/test_client_regress/subcontext/', data={'supervar': 1, 'value_for_subvar': 2})
+        self.assertEqual(len(response.context), 2)
+        self.assertEqual(response.context['supervar'], u'1')
+        self.assertEqual(response.context['subvar'], u'2')
+
+    def test_subcontext_direct(self):
+        "Context variables retrieved from subcontexts can be accessed separately"
+        response = self.client.get('/test_client_regress/subcontext/', data={'supervar': 1, 'value_for_subvar': 2})
+
+        # context for the supertemplate: subcontext not yet set
+        self.assertEqual(response.context[0]['supervar'], u'1')
+        self.assertFalse('subvar' in response.context[0])
+
+        # context for the subtemplate: subcontext has been set
+        self.assertEqual(response.context[1]['supervar'], u'1')
+        self.assertEqual(response.context[1]['subvar'], u'2')
+
 class SessionTests(TestCase):
     fixtures = ['testdata.json']
 
diff --git a/tests/regressiontests/test_client_regress/urls.py b/tests/regressiontests/test_client_regress/urls.py
index 99eb7b7..f1db23a 100644
--- a/tests/regressiontests/test_client_regress/urls.py
+++ b/tests/regressiontests/test_client_regress/urls.py
@@ -24,4 +24,5 @@ urlpatterns = patterns('',
     (r'^request_methods/$', views.request_methods_view),
     (r'^check_unicode/$', views.return_unicode),
     (r'^parse_unicode_json/$', views.return_json_file),
+    (r'^subcontext/$', views.view_with_subcontext),
 )
diff --git a/tests/regressiontests/test_client_regress/views.py b/tests/regressiontests/test_client_regress/views.py
index 5ba7cc3..0e0c3aa 100644
--- a/tests/regressiontests/test_client_regress/views.py
+++ b/tests/regressiontests/test_client_regress/views.py
@@ -86,3 +86,15 @@ def return_json_file(request):
                             mimetype='application/json; charset=' + charset)
     response['Content-Disposition'] = 'attachment; filename=testfile.json'
     return response
+
+def view_with_subcontext(request):
+    """A view that augments the context when including a sub-template
+
+    The purpose of this view is to check that the test client
+    correctly catches context variables from sub-contexts.  This
+    happens when a sub-template is rendered with a context modified or
+    created by a template tag.
+    """
+    return render_to_response("testclient/super.html",
+                              {'supervar': request.GET['supervar'],
+                               'value_for_subvar': request.GET['value_for_subvar']})
diff --git a/tests/templates/testclient/sub.html b/tests/templates/testclient/sub.html
new file mode 100644
index 0000000..bb4cad6
--- /dev/null
+++ b/tests/templates/testclient/sub.html
@@ -0,0 +1,2 @@
+{{ subvar }}
+
diff --git a/tests/templates/testclient/super.html b/tests/templates/testclient/super.html
new file mode 100644
index 0000000..998fb0c
--- /dev/null
+++ b/tests/templates/testclient/super.html
@@ -0,0 +1,2 @@
+Value of supervar: {{ supervar }}
+Value of subvar: {% with value_for_subvar as subvar %}{% include "testclient/sub.html" %}{% endwith %}
