if (!_detachProxies) {
// Even if we're not detaching proxies, we need to remove the reference to the SM.
proxy.setOwner(null, -1);
return;
}
Object unproxied = proxy.copy(proxy);
fm.storeObjectField(fieldIndex, unproxied);
sm.replaceField(pc, fm, fieldIndex);
fm.clear();
// clean up old proxy
proxy.setOwner(null, -1);