         melpa-recipe
       ;; Next most preferred is GNU ELPA.
       (or (and (member 'gnu-elpa sources)
-               (straight--get-gnu-elpa-recipe package))
+               (straight--get-gnu-elpa-recipe package cause))
           ;; EmacsMirror comes after GNU ELPA because we prefer
           ;; "official" sources, so that it is easier to figure out
           ;; what upstream to submit changes against.
           (and (member 'emacsmirror sources)
-               (straight--get-emacsmirror-recipe package))
+               (straight--get-emacsmirror-recipe package cause))
           ;; This shouldn't be possible in normal cases, since
           ;; EmacsMirror ostensibly contains all packages that are in
           ;; MELPA. But you never know. It's better to return a

                       'string-lessp)
                      (lambda (elt) t)
                      'require-match)))
           (recipe (straight--lookup-recipe package sources)))
      (pcase action
        ('insert (insert (format "%S" recipe)))

If two recipes specify the same `:package', but have different
values for any of these keywords, then they are incompatible.")

(defun straight--lookup-recipe (package &optional sources cause)
  "Look up a PACKAGE recipe in one or more SOURCES.
PACKAGE should be a symbol, and SOURCES should be a list
containing one or more of `gnu-elpa', `melpa', and
