diff --git a/includes/common.inc b/includes/common.inc
index 9b582c4..be2e6d4 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -3492,9 +3492,10 @@ function _drupal_build_css_path($matches, $base = NULL) {
  */
 function drupal_load_stylesheet($file, $optimize = NULL, $reset_basepath = TRUE) {
   // These statics are not cache variables, so we don't use drupal_static().
-  static $_optimize, $basepath;
+  static $_optimize, $basepath, $basepath_stack;
   if ($reset_basepath) {
     $basepath = '';
+    $basepath_stack = array();
   }
   // Store the value of $optimize for preg_replace_callback with nested
   // @import loops.
@@ -3507,17 +3508,19 @@ function drupal_load_stylesheet($file, $optimize = NULL, $reset_basepath = TRUE)
   if ($basepath && !file_uri_scheme($file)) {
     $file = $basepath . '/' . $file;
   }
+  array_push($basepath_stack, $basepath);
   $basepath = dirname($file);
 
   // Load the CSS stylesheet. We suppress errors because themes may specify
   // stylesheets in their .info file that don't exist in the theme's path,
   // but are merely there to disable certain module CSS files.
+  $result = '';
   if ($contents = @file_get_contents($file)) {
     // Return the processed stylesheet.
-    return drupal_load_stylesheet_content($contents, $_optimize);
+    $result = drupal_load_stylesheet_content($contents, $_optimize);
   }
-
-  return '';
+  $basepath = array_pop($basepath_stack);
+  return $result;
 }
 
 /**
