Report on cache failures for cmd.script states

This commit will report that the source script failed to cache, rather
than misreporting that the script was run when it couldn't possibly
have run.

Fixes #6230