Fix write operation on a deleted object in the same transaction