diff --git a/core/Config/IniFileChain.php b/core/Config/IniFileChain.php
index d8b4e4e28bd6adce4a6f6beafa50b1236703e764..b69154049f28437194744cce7855734665b75d29 100644
--- a/core/Config/IniFileChain.php
+++ b/core/Config/IniFileChain.php
@@ -222,7 +222,23 @@ class IniFileChain
             }
         }
 
-        $this->mergedSettings = $this->mergeFileSettings();
+        $merged = $this->mergeFileSettings();
+        // remove reference to $this->settingsChain... otherwise dump() or compareElements() will never notice a difference
+        // on PHP 7+ as they would be always equal
+        $this->mergedSettings = $this->copy($merged);
+    }
+
+    private function copy($merged)
+    {
+        $copy = array();
+        foreach ($merged as $index => $value) {
+            if (is_array($value)) {
+                $copy[$index] = $this->copy($value);
+            } else {
+                $copy[$index] = $value;
+            }
+        }
+        return $copy;
     }
 
     private function resetSettingsChain($defaultSettingsFiles, $userSettingsFile)