                         (format "Building %s" package))))
       (straight--with-progress task
         (straight--symlink-package recipe)
+        ;; The following function call causes the dependency list to
+        ;; be written to the build cache. To prevent this from being
+        ;; overwritten when any dependencies are built, we have to be
+        ;; sure to bind `straight--package-build-in-progress' below!
         (straight--compute-dependencies package)
         ;; Before we (possibly) build the dependencies, we need to set
         ;; this flag so that we know if our progress message will need

        ;; generated for the dependencies in that situation if we
        ;; don't do it again in `straight-use-package'.
        (when-let ((dependencies (straight--get-dependencies package)))
          (dolist (dependency dependencies)
            ;; The implicit meaning of the first argument to
            ;; `straight-use-package' here is that the default
            ;; recipes (taken from one of the recipe repositories) are
            ;; used for dependencies. (Well, maybe. See all the weird
            ;; edge cases and exceptions in
            ;; `straight--convert-recipe'.) Note that the second
            ;; argument is always nil. That is, even if the user was
            ;; supposed to be prompted about whether they wanted to
            ;; install this package, if they say yes then all the
            ;; dependencies are automatically installed (what else
            ;; could the user want?).
            (straight-use-package (intern dependency) nil task))
          ;; We might need to redisplay the progress message from
          ;; `straight--with-progress' up above.
          (when straight--echo-area-dirty

The exception to this is if the user calls
`straight-declare-init-finished' (which see) in their init-file,
which allows for loading to again only take place once when the
user reloads their init-file. Also, loading will be inhibited
when building dependencies, to avoid the dependency for the root
package that was written into the build cache from being
overwritten. See `straight--package-build-in-progress'."
  (cond
   ;; If this is a dependency, unconditionally inhibit loading.
   (straight--package-build-in-progress nil)
   ;; During initialization, we use `after-init-hook'.
   ((not after-init-time)
    (unless (member #'straight--save-build-cache after-init-hook)
