There are one of two ways this can happen.
1. You ran step 3 multiple times on the 486 upgrade and then after rebuilt missing thumbs
2. You did not run the required upgrades and then rebuilt missing thumbs.
Basically the way to rectify this is to restore a backup of the photos tables and run your upgrade script again.