diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticNode.java
index cbf0003eecd8b8e5b9efc923888ecbf2d9be2c6a..828f41b4792faab47e28936758eedc952b16c09d 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticNode.java
@@ -167,10 +167,11 @@ public abstract class BinaryArithmeticNode extends RBuiltinNode {
 
         public BinaryMapNode get(BinaryArithmetic arithmetic, RAbstractVector left, RAbstractVector right) {
             CompilerAsserts.neverPartOfCompilation();
-            if (!cached.isSupported(left, right)) {
-                cached = cached.replace(createCached(arithmetic, left, right));
+            BinaryMapNode map = cached;
+            if (!map.isSupported(left, right)) {
+                cached = map = map.replace(createCached(arithmetic, left, right));
             }
-            return cached;
+            return map;
         }
     }
 }