diff --git a/plugins/facetapi/adapter.inc b/plugins/facetapi/adapter.inc
index ba4eecb..d055ece 100644
--- a/plugins/facetapi/adapter.inc
+++ b/plugins/facetapi/adapter.inc
@@ -867,6 +867,33 @@ abstract class FacetapiAdapter {
           $this->settings[$name]->settings['dependencies'] = array();
         }
         $class = ctools_plugin_load_class('facetapi', 'dependencies', $id, 'handler');
+
+        // Sometimes the class is not available. Something with ctools, module weights, and static caching.
+        // See https://www.drupal.org/node/1816110
+        if (!$class) {
+          // Try clearing out the static cache and trying again...
+          drupal_static_reset();
+          static $drupal_static_fast;
+          $drupal_static_fast = NULL;
+          $class = ctools_plugin_load_class('facetapi', 'dependencies', $id, 'handler');
+        }
+
+        // Now this is just getting silly... No class again!
+        // Try including everything in this directory...
+        if (!$class) {
+          $dir = dirname(__FILE__);
+          $files = file_scan_directory($dir, "/.*inc$/");
+          foreach ($files as $file) {
+            include_once $file->uri;
+          }
+        }
+
+        // If still no class then something is wrong. Log is and carry on...
+        if (!$class) {
+          watchdog("facetapi", "Missing plugin class for facetapi dependency: " . $id, array(), WATCHDOG_ERROR);
+          return new stdClass();
+        }
+
         $plugin = new $class($id, $this, $facet, $this->settings[$name], array());
         $this->settings[$name]->settings['dependencies'] += $plugin->getDefaultSettings();
       }
