--- old/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SetMethodCreator.java 2016-03-18 11:22:28.490479356 +0100 +++ new/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SetMethodCreator.java 2016-03-18 11:22:28.410479359 +0100 @@ -145,8 +145,7 @@ final boolean isStrict = NashornCallSiteDescriptor.isStrict(desc); final MethodHandle methodHandle; - if (NashornCallSiteDescriptor.isDeclaration(desc)) { - assert property.needsDeclaration(); + if (NashornCallSiteDescriptor.isDeclaration(desc) && property.needsDeclaration()) { // This is a LET or CONST being declared. The property is already there but flagged as needing declaration. // We create a new PropertyMap with the flag removed. The map is installed with a fast compare-and-set // method if the pre-callsite map is stable (which should be the case for function scopes except for