diff --git a/rules.module b/rules.module
index 07d4cac..783bea3 100644
--- a/rules.module
+++ b/rules.module
@@ -376,6 +376,9 @@ function _rules_rebuild_cache(&$cache) {
  *   The cid of a specific component to re-build.
  */
 function _rules_rebuild_component_cache($cid = NULL) {
+  // Ensure the environment is ready.
+  module_load_include('inc', 'rules', 'rules.rules');
+
   $conditions = array();
   // If a specific cid was requested only load that component.
   if (!empty($cid)) {
