Fix repositioning after delete.
Fix test related to repositioning.