Notice that even though I asked it to delete ID=997 it decided to delete 1000 instead. So in the end I ended up with two rows with 997 as the ID and no row with 1000 as the ID.
forgot to mention that in the above attempt the GUI looked as if everything was done correctly until I sorted which then revealed the bad underlying data.