diff --git a/django/template/__init__.py b/django/template/__init__.py
index ca1bd49..adf0352 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -59,8 +59,8 @@ from django.template.base import (ALLOWED_VARIABLE_CHARS, BLOCK_TAG_END,
 
 # Exceptions
 from django.template.base import (ContextPopException, InvalidTemplateLibrary,
-    TemplateDoesNotExist, TemplateEncodingError, TemplateSyntaxError,
-    VariableDoesNotExist)
+    TemplateDoesNotExist, IncludedTemplateDoesNotExist, TemplateEncodingError, 
+    TemplateSyntaxError, VariableDoesNotExist)
 
 # Template parts
 from django.template.base import (Context, FilterExpression, Lexer, Node,
diff --git a/django/template/base.py b/django/template/base.py
index d934e05..063b5db 100644
--- a/django/template/base.py
+++ b/django/template/base.py
@@ -61,6 +61,9 @@ class TemplateSyntaxError(Exception):
 class TemplateDoesNotExist(Exception):
     pass
 
+class IncludedTemplateDoesNotExist(Exception):
+    pass
+
 class TemplateEncodingError(Exception):
     pass
 
diff --git a/django/template/loader.py b/django/template/loader.py
index 279d8e8..885cd16 100644
--- a/django/template/loader.py
+++ b/django/template/loader.py
@@ -26,7 +26,10 @@
 # installed, because pkg_resources is necessary to read eggs.
 
 from django.core.exceptions import ImproperlyConfigured
-from django.template.base import Origin, Template, Context, TemplateDoesNotExist, add_to_builtins
+from django.template.base import (Origin, Template, Context,
+                                  TemplateDoesNotExist,
+                                  IncludedTemplateDoesNotExist,
+                                  add_to_builtins)
 from django.utils.importlib import import_module
 from django.conf import settings
 
@@ -157,7 +160,10 @@ def get_template(template_name):
     template, origin = find_template(template_name)
     if not hasattr(template, 'render'):
         # template needs to be compiled
-        template = get_template_from_string(template, origin, template_name)
+        try:
+            template = get_template_from_string(template, origin, template_name)
+        except TemplateDoesNotExist, included_template_name:
+            raise IncludedTemplateDoesNotExist, included_template_name
     return template
 
 def get_template_from_string(source, origin=None, name=None):
@@ -190,7 +196,9 @@ def select_template(template_name_list):
     for template_name in template_name_list:
         try:
             return get_template(template_name)
-        except TemplateDoesNotExist:
+        except TemplateDoesNotExist, e:
+            if isinstance(e, IncludedTemplateDoesNotExist):
+                raise
             continue
     # If we get here, none of the templates could be loaded
     raise TemplateDoesNotExist(', '.join(template_name_list))
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 475f923..6194f46 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -248,7 +248,7 @@ class Templates(unittest.TestCase):
                 r = tmpl.render(template.Context({}))
             except template.TemplateSyntaxError, e:
                 settings.TEMPLATE_DEBUG = old_td
-                self.assertEqual(e.args[0], 'Caught TemplateDoesNotExist while rendering: missing.html')
+                self.assertEqual(e.args[0], 'Caught IncludedTemplateDoesNotExist while rendering: missing.html')
             self.assertEqual(r, None, 'Template rendering unexpectedly succeeded, produced: ->%r<-' % r)
         finally:
             loader.template_source_loaders = old_loaders
@@ -274,7 +274,7 @@ class Templates(unittest.TestCase):
             try:
                 r = tmpl.render(template.Context({}))
             except template.TemplateSyntaxError, e:
-                self.assertEqual(e.args[0], 'Caught TemplateDoesNotExist while rendering: missing.html')
+                self.assertEqual(e.args[0], 'Caught IncludedTemplateDoesNotExist while rendering: missing.html')
             self.assertEqual(r, None, 'Template rendering unexpectedly succeeded, produced: ->%r<-' % r)
 
             # For the cached loader, repeat the test, to ensure the first attempt did not cache a
@@ -283,7 +283,7 @@ class Templates(unittest.TestCase):
             try:
                 tmpl.render(template.Context({}))
             except template.TemplateSyntaxError, e:
-                self.assertEqual(e.args[0], 'Caught TemplateDoesNotExist while rendering: missing.html')
+                self.assertEqual(e.args[0], 'Caught IncludedTemplateDoesNotExist while rendering: missing.html')
             self.assertEqual(r, None, 'Template rendering unexpectedly succeeded, produced: ->%r<-' % r)
         finally:
             loader.template_source_loaders = old_loaders
