diff --git a/configuration.export.inc b/configuration.export.inc
index d50a84f..4b826df 100644
--- a/configuration.export.inc
+++ b/configuration.export.inc
@@ -40,24 +40,59 @@ function configuration_populate($items, $dependencies) {
  *
  * @return fully populated $export array.
  */
-function _configuration_populate($pipe, &$export) {
-  configuration_include();
+function _configuration_populate($pipe, &$export, $module_name = '') {
   foreach ($pipe as $component => $data) {
-    if ($function = configuration_hook($component, 'configuration_export')) {
+    static $processed = array();
+    // Convert already defined items to dependencies.
+    _configuration_resolve_dependencies($data, $export, $module_name, $component);
+    if (!empty($data) && $function = configuration_hook($component, 'configuration_export')) {
       // Pass module-specific data and export array.
       // We don't use configuration_invoke() here since we need to pass $export by reference.
       $more = $function($data, $export, $component);
+      // Add the context information.
+      $export['component'] = $component;
+      $export['module_name'] = $module_name;
       // Allow other modules to manipulate the pipe to add in additional modules.
-      drupal_alter('configuration_pipe_' . $component, $more, $data, $export);
-      // Allow for export functions to request additional exports.
+      drupal_alter(array('configuration_pipe', 'configuration_pipe_' . $component), $more, $data, $export);
+      // Remove the component information.
+      unset($export['component']);
+      unset($export['module_name']);
+      // Allow for export functions to request additional exports, but avoid
+      // circular references on already processed components.
+      $processed[$component] = isset($processed[$component]) ? array_merge($processed[$component], $data) : $data;
+
       if (!empty($more)) {
-        _configuration_populate($more, $export);
+        // Remove already processed components.
+        foreach ($more as $component_name => $component_data) {
+          if (isset($processed[$component_name])) {
+            $more[$component_name] = array_diff($component_data, $processed[$component_name]);
+          }
+        }
+        if ($more = array_filter($more)) {
+          _configuration_populate($more, $export, $module_name);
+        }
       }
     }
   }
   return $export;
 }
 
+
+/**
+ * Iterates over data and convert to dependencies if already defined elsewhere.
+ */
+function _configuration_resolve_dependencies(&$data, &$export, $module_name, $component) {
+  if ($map = configuration_get_default_map($component)) {
+    foreach ($data as $key => $item) {
+      // If this node type is provided by a different module, add it as a dependency
+      if (isset($map[$item]) && $map[$item] != $module_name) {
+        $export['dependencies'][$map[$item]] = $map[$item];
+        unset($data[$key]);
+      }
+    }
+  }
+}
+
 /**
  * Iterates over a list of dependencies and kills modules that are
  * captured by other modules 'higher up'.
