Fix scoped data replacement