Fix incorrect stdout/stderr in remote action cache. Fixes #9072

Commit a6b5b0540 introduced a bug where the stdout/test.log of
an action was incorrectly added as an output file to the
ActionResult protobuf. Fortunately, we found the bug on Windows
because one cannot delete a file while it's still being open.

PAIR=pcloudy

Closes #9087.

PiperOrigin-RevId: 261885751
diff --git a/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java b/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java
index 03b417d..8d27c2e 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java
@@ -665,11 +665,11 @@
     public void setStdoutStderr(FileOutErr outErr) throws IOException {
       if (outErr.getErrorPath().exists()) {
         stderrDigest = digestUtil.compute(outErr.getErrorPath());
-        addFile(stderrDigest, outErr.getErrorPath());
+        digestToFile.put(stderrDigest, outErr.getErrorPath());
       }
       if (outErr.getOutputPath().exists()) {
         stdoutDigest = digestUtil.compute(outErr.getOutputPath());
-        addFile(stdoutDigest, outErr.getOutputPath());
+        digestToFile.put(stdoutDigest, outErr.getOutputPath());
       }
     }