- if(tm == null) { // didn't find a trap marker, try to find a trap
- t = target instanceof JSScope ? t = ((JSScope)target).top().getTrap(key) : ((JS)target).getTrap(key);
- while(t != null && t.readTrap()) t = t.next;
+ if(tm == null) { // not cascading
+ t = target instanceof JSScope ? t = ((JSScope)target).top().getTrap(key) : target.getTrap(key);
+ if(t != null) t = t.writeTrap();
+ }
+ if(t == null && target instanceof JS.Clone) {
+ target = ((JS.Clone)target).clonee;
+ t = target.getTrap(key);
+ if(t != null) t = t.writeTrap();