Proper detachment/reference counting for edits.