diff --git a/features.module b/features.module
index 35dc0c6..1a6960d 100644
--- a/features.module
+++ b/features.module
@@ -1243,14 +1243,7 @@ function _features_set_export_language() {
       'weight' => 0,
       'javascript' => '',
     );
-    // Ensure that static caches are cleared, as they might contain language
-    // specific information. But keep some important ones. The call below
-    // accesses a non existing key and requests to reset it. In such cases the
-    // whole caching data array is returned.
-    $static = drupal_static(uniqid('', TRUE), NULL, TRUE);
-    drupal_static_reset();
-    // Restore some of the language independent, runtime state information to
-    // keep everything working and avoid unnecessary double processing.
+
     $static_caches_to_keep = array(
       'conf_path',
       'system_list',
@@ -1285,12 +1278,29 @@ function _features_set_export_language() {
       'features_get_components',
       'features_get_components_by_key',
     );
-    foreach ($static_caches_to_keep as $cid) {
-      if (isset($static[$cid])) {
-        $data = &drupal_static($cid);
-        $data = $static[$cid];
-      }
+
+    // Ensure that static caches are cleared, as they might contain language
+    // specific information. But keep some important ones. The call below
+    // accesses a non existing key and requests to reset it. In such cases the
+    // whole caching data array is returned.
+    $static = drupal_static(uniqid('', TRUE), NULL, TRUE);
+
+    // Filter out statics we want to keep.
+    $static = array_intersect_key($static, drupal_map_assoc($static_caches_to_keep));
+
+    // Do a deep copy of statics.
+    $static = unserialize(serialize(($static)));
+
+    // Reset all statics.
+    drupal_static_reset();
+
+    // Restore some of the language independent, runtime state information to
+    // keep everything working and avoid unnecessary double processing.
+    foreach ($static as $cid => $value) {
+      $data = &drupal_static($cid);
+      $data = $value;
     }
+
     $called = &drupal_static(__FUNCTION__);
     $called = TRUE;
   }
