Restore code from 6b6dbcd7 to fix the wrong selection after a rename in list view when a row change occurs.