Sneaky, I had a similar problem. 30-50 images disappeared, but the most recently 10 images are still in the media library.
I restored a database backup from 11/1, but the same images are gone. It seems as if this only happened after my automatic 4.0.1 update. I’m trying to reinstall 4.0.1 to see if it fixes anything, but I’m clueless.
Any ideas?