diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py
index 521df2d..93f9018 100644
--- a/django/template/loader_tags.py
+++ b/django/template/loader_tags.py
@@ -125,53 +125,39 @@ class ExtendsNode(Node):
         # the same.
         return compiled_parent._render(context)
 
-class BaseIncludeNode(Node):
-    def __init__(self, *args, **kwargs):
-        self.extra_context = kwargs.pop('extra_context', {})
-        self.isolated_context = kwargs.pop('isolated_context', False)
-        super(BaseIncludeNode, self).__init__(*args, **kwargs)
-
-    def render_template(self, template, context):
-        values = dict([(name, var.resolve(context)) for name, var
-                       in self.extra_context.iteritems()])
-        if self.isolated_context:
-            return template.render(context.new(values))
-        context.update(values)
-        output = template.render(context)
-        context.pop()
-        return output
-
-class ConstantIncludeNode(BaseIncludeNode):
-    def __init__(self, template_path, *args, **kwargs):
-        super(ConstantIncludeNode, self).__init__(*args, **kwargs)
-        try:
-            t = get_template(template_path)
-            self.template = t
-        except:
-            if settings.TEMPLATE_DEBUG:
-                raise
-            self.template = None
-
-    def render(self, context):
-        if not self.template:
-            return ''
-        return self.render_template(self.template, context)
-
-class IncludeNode(BaseIncludeNode):
-    def __init__(self, template_name, *args, **kwargs):
-        super(IncludeNode, self).__init__(*args, **kwargs)
+class IncludeNode(Node):
+    def __init__(self, template_name, resolve=False, *args, **kwargs):
         self.template_name = template_name
+        self.resolve = resolve
+        self.extra_context = kwargs.pop('with', {})
+        self.isolated_context = kwargs.pop('only', False)
+        super(IncludeNode, self).__init__(*args, **kwargs)
 
     def render(self, context):
+        template_name = self.template_name
+
         try:
-            template_name = self.template_name.resolve(context)
+            if self.resolve:
+                template_name = template_name.resolve(context)
+
             template = get_template(template_name)
+
             return self.render_template(template, context)
         except:
             if settings.TEMPLATE_DEBUG:
                 raise
             return ''
 
+    def render_template(self, template, context):
+        values = dict([(name, var.resolve(context)) for name, var
+                       in self.extra_context.iteritems()])
+        if self.isolated_context:
+            return template.render(context.new(values))
+        context.update(values)
+        output = template.render(context)
+        context.pop()
+        return output
+
 @register.tag('block')
 def do_block(parser, token):
     """
@@ -243,6 +229,7 @@ def do_include(parser, token):
     bits = token.split_contents()
     if len(bits) < 2:
         raise TemplateSyntaxError("%r tag takes at least one argument: the name of the template to be included." % bits[0])
+
     options = {}
     remaining_bits = bits[2:]
     while remaining_bits:
@@ -260,12 +247,21 @@ def do_include(parser, token):
         else:
             raise TemplateSyntaxError('Unknown argument for %r tag: %r.' %
                                       (bits[0], option))
-        options[option] = value
-    isolated_context = options.get('only', False)
-    namemap = options.get('with', {})
-    path = bits[1]
-    if path[0] in ('"', "'") and path[-1] == path[0]:
-        return ConstantIncludeNode(path[1:-1], extra_context=namemap,
-                                   isolated_context=isolated_context)
-    return IncludeNode(parser.compile_filter(bits[1]), extra_context=namemap,
-                       isolated_context=isolated_context)
+        options[str(option)] = value
+
+    options.setdefault("only", False)
+    options.setdefault("with", {})
+
+    template_name = bits[1]
+    if template_name[0] in ('"', "'") and template_name[-1] == template_name[0]:
+        resolve = False
+        template_name = template_name[1:-1]
+    else:
+        resolve = True
+        template_name = parser.compile_filter(template_name)
+
+    return IncludeNode(
+        template_name,
+        resolve=resolve,
+        **options
+    )
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 1a1b360..5b47d29 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -21,7 +21,7 @@ from django.template import base as template_base, RequestContext, Template, Con
 from django.core import urlresolvers
 from django.template import loader
 from django.template.loaders import app_directories, filesystem, cached
-from django.test import RequestFactory
+from django.test import RequestFactory, TestCase
 from django.test.utils import (get_warnings_state, restore_warnings_state,
     setup_test_template_loader, restore_template_loaders, override_settings)
 from django.utils import unittest
@@ -1728,3 +1728,144 @@ class RequestContextTests(BaseTemplateResponseTest):
             template.Template('{% include "child" only %}').render(ctx),
             'none'
         )
+
+
+class IncludeTagTest(TestCase):
+
+    def setUp(self):
+        setup_test_template_loader({
+            "basic.html": "Basic",
+            "headline.html": "{{ headline }}",
+            "has space.html": "Spaced",
+            "onetwo.html": "{{ first }}-{{ second }}",
+            "recursive.html": "{% for item in items %}{{ item.label }}{% if not item.children|length_is:0 %}{% with item.children as items %}({% include 'recursive.html' %}){% endwith %}{% endif %}{% endfor %}",
+        })
+
+    def tearDown(self):
+        restore_template_loaders()
+
+    def test_include(self):
+        t = Template("{% include 'basic.html' %}")
+        c = Context()
+        output = t.render(c)
+        self.assertEqual(output, "Basic")
+
+    def test_context(self):
+        t = Template("{% include 'headline.html' %}")
+        c = Context(dict(headline="Headline"))
+        output = t.render(c)
+        self.assertEqual(output, "Headline")
+
+    def test_include_variable(self):
+        t = Template("{% include template_name %}")
+        c = Context(dict(template_name="basic.html"))
+        output = t.render(c)
+        self.assertEqual(output, "Basic")
+
+    def test_does_not_exist(self):
+        t = Template("{% include 'chuck-testa.html' %}")
+        c = Context()
+        self.assertEqual(t.render(c), "")
+        with self.settings(TEMPLATE_DEBUG=True):
+            with self.assertRaises(template.TemplateDoesNotExist):
+                t.render(c)
+
+        t = Template("{% include template_name %}")
+        c = Context(dict(template_name="nope.html"))
+        self.assertEqual(t.render(c), "")
+        with self.settings(TEMPLATE_DEBUG=True):
+            with self.assertRaises(template.TemplateDoesNotExist):
+                t.render(c)
+
+        t = Template("{% if false %}{% include 'chuck-testa.html' %}{% endif %}")
+        c = Context(dict(false=False))
+        self.assertEqual(t.render(c), "")
+        with self.settings(TEMPLATE_DEBUG=True):
+            self.assertEqual(t.render(c), "")
+
+    def test_recursive_include(self):
+        t = loader.get_template("recursive.html")
+        c = Context({
+            'items': [ 
+                {'label': 1, 'children': [ 
+                    {'label': 2, 'children': [ 
+                        {'label': 3, 'children': []}, 
+                        {'label': 4, 'children': []}, 
+                    ]}, 
+                ]},
+            ]}
+        )
+        self.assertEqual(t.render(c), "1(2(34))")
+
+    def test_with_space(self):
+        t = Template("{% include 'has space.html' %}")
+        c = Context()
+        output = t.render(c)
+        self.assertEqual(output, "Spaced")
+
+    def test_inline_context(self):
+        t = Template("{% include 'headline.html' with headline='Inline' %}")
+        c = Context()
+        output = t.render(c)
+        self.assertEqual(output, "Inline")
+
+        t = Template("{% include headline with headline='Dynamic' %}")
+        c = Context(dict(headline="headline.html"))
+        output = t.render(c)
+        self.assertEqual(output, "Dynamic")
+
+        t = Template("{{ headline }} {% include 'headline.html' with headline=headline|upper %}")
+        c = Context(dict(headline="Headline"))
+        output = t.render(c)
+        self.assertEqual(output, "Headline HEADLINE")
+
+    def test_isolated_context(self):
+        t = Template("{% include 'headline.html' only %}")
+        c = Context(dict(headline="Headline"))
+        output = t.render(c)
+        self.assertEqual(output, "")
+
+        t = Template("{% include 'onetwo.html' only with first='Inline' %}")
+        c = Context(dict(
+            first="First",
+            second="Second",
+        ))
+        output = t.render(c)
+        self.assertEqual(output, "Inline-")
+
+        t = Template("{% include 'onetwo.html' with first='Inline' only %}")
+        c = Context(dict(
+            first="First",
+            second="Second",
+        ))
+        output = t.render(c)
+        self.assertEqual(output, "Inline-")
+
+    def test_autoescape_context(self):
+        t = Template("{% autoescape off %}{% include 'onetwo.html' %}{% endautoescape %}")
+        c = Context(dict(
+            first="&",
+        ))
+        output = t.render(c)
+        self.assertEqual(output, "&-")
+
+        t = Template("{% autoescape off %}{% include 'onetwo.html' with first=var1 only %}{% endautoescape %}")
+        c = Context(dict(var1="&"))
+        output = t.render(c)
+        self.assertEqual(output, "&-")
+
+    def test_errors(self):
+        with self.assertRaises(template.TemplateSyntaxError):
+            t = Template("{% include 'onetwo.html' with %}")
+
+        with self.assertRaises(template.TemplateSyntaxError):
+            t = Template("{% include 'onetwo.html' with 'no key' %}")
+
+        with self.assertRaises(template.TemplateSyntaxError):
+            t = Template("{% include 'onetwo.html' with dotted.arg='error' %}")
+
+        with self.assertRaises(template.TemplateSyntaxError):
+            t = Template("{% include 'onetwo.html' with something_random %}")
+
+        with self.assertRaises(template.TemplateSyntaxError):
+            t = Template("{% include 'onetwo.html' with only only %}")
