Fix conflict where a SkyKey could have ShareabilityOfValue.ALWAYS while its SkyValue was an instance of UnshareableValue.

RELNOTES: None.
PiperOrigin-RevId: 220185833
diff --git a/src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java b/src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java
index ad7105a..491d10d 100644
--- a/src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java
+++ b/src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java
@@ -348,6 +348,8 @@
 
   /** An exception indicating that the node's value changed but its version did not. */
   public static final class ChangedValueAtSameVersionException extends IllegalStateException {
+    private final SkyValue newValue;
+
     private ChangedValueAtSameVersionException(
         Version lastChangedVersion,
         Version newVersion,
@@ -358,6 +360,12 @@
               "Changed value but with the same version? "
                   + "lastChangedVersion: %s, newVersion: %s newValue: %s, nodeEntry: %s",
               lastChangedVersion, newVersion, newValue, nodeEntry));
+      this.newValue = newValue;
+    }
+
+    /** Returns the value that this node changed to. */
+    public SkyValue getNewValue() {
+      return newValue;
     }
   }