--- old/src/jdk/nashorn/internal/runtime/SetMethodCreator.java 2013-12-18 15:46:50.202206772 +0100 +++ new/src/jdk/nashorn/internal/runtime/SetMethodCreator.java 2013-12-18 15:46:50.122206772 +0100 @@ -151,10 +151,12 @@ assert methodHandle != null; assert property != null; - final ScriptObject prototype = find.getOwner(); final MethodHandle boundHandle; - if (!property.hasSetterFunction(prototype) && find.isInherited()) { - boundHandle = ScriptObject.bindTo(methodHandle, prototype); + if (!property.hasSetterFunction(find.getOwner()) && find.isInherited()) { + // Bind or add prototype filter depending on whether this is a scope object. + boundHandle = sobj.isScope() ? + ScriptObject.addProtoFilter(methodHandle, find.getProtoChainLength()): + ScriptObject.bindTo(methodHandle, find.getOwner()); } else { boundHandle = methodHandle; }