Index: genshi/template/loader.py
===================================================================
--- genshi/template/loader.py	(revision 893)
+++ genshi/template/loader.py	(working copy)
@@ -163,7 +163,9 @@
         """
         if cls is None:
             cls = self.default_class
-        if relative_to and not os.path.isabs(relative_to):
+
+        search_path = self.search_path
+        if relative_to and (not search_path or not os.path.isabs(relative_to)):
             filename = os.path.join(os.path.dirname(relative_to), filename)
         filename = os.path.normpath(filename)
         cachekey = filename
@@ -181,7 +183,6 @@
             except (KeyError, OSError):
                 pass
 
-            search_path = self.search_path
             isabs = False
 
             if os.path.isabs(filename):

