diff --git a/core/includes/common.inc b/core/includes/common.inc
index 17e1363..d1e04e0 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -5182,13 +5182,10 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1)
   // profile always has precedence.
   $searchdir[] = drupal_get_path('profile', $profile) . '/' . $directory;
 
-  // For the case of searching for profiles, scan top-level directories.
-  // @todo Replace entire sites/all/$directory with this.
+  // Always search in top-level directories (containing contributed and custom
+  // extensions).
   $searchdir[] = $directory;
 
-  // Always search sites/all/* as well as the global directories.
-  $searchdir[] = 'sites/all/' . $directory;
-
   if (file_exists("$config/$directory")) {
     $searchdir[] = "$config/$directory";
   }
