* guix/packages.scm (package-derivation): Move `cache' call before the traversal of PACKAGE's inputs.