                (obj (object-assoc pkg-name
                                   :name configuration-layer--packages)))
           (if obj
-              (setq obj (configuration-layer/make-package pkg obj ownerp))
-            (setq obj (configuration-layer/make-package pkg nil ownerp))
+              (setq obj (configuration-layer/make-package pkg obj ownerp layer))
+            (setq obj (configuration-layer/make-package pkg nil ownerp layer))
             (push obj configuration-layer--packages))
           (when ownerp
             ;; last owner wins over the previous one,

         (protected (when (listp pkg) (plist-get (cdr pkg) :protected)))
         (copyp (not (null obj)))
         (obj (if obj obj (cfgl-package name-str :name name-sym))))
    (when location (oset obj :location location))
    (when min-version (oset obj :min-version (version-to-list min-version)))
    (when step (oset obj :step step))

(provide 'core-configuration-layer)

;;; core-configuration-layer.el ends here
