                   ;; we asume that the user layers must have the final word
                   ;; on configuration choices.
                   (list configuration-layer-private-directory)))
-    (ht-copy result)))
+    result))
 
 (defun configuration-layer//discover-layers-in-dir (dir)
   "Return an alist where the key is a layer symbol and the value is the path


FILE is a string with value `packages' or `extensions'.
VAR is a string with value `packages', `pre-extensions' or `post-extensions'."
  (let ((result #s(hash-table size 512 data ())))
    (ht-clear result)
    (dolist (layer layers)
      (let* ((layer-sym (car layer))
             (dir (plist-get (cdr layer) :dir))

(defun configuration-layer//get-packages-dependencies ()
  "Returns a hash map where key is a dependency package symbol and value is
a list of all packages which depend on it."
  (let ((result (make-hash-table :size 200)))
    (dolist (pkg package-alist)
      (let* ((pkg-sym (car pkg))
             (deps (configuration-layer//get-package-dependencies pkg-sym)))
