Project can not be saved - the project is corrupt

I got the same error message just now. Here’s how it happened:

Before the error message appeared:
Wanting to remove unused files in the Pool, I opened the Pool (Ctrl P), clicked on a single file, and then selected all the files (Ctrl A). Then I right-clicked, and selected “Remove unused media”, and clicked the Trash button. Then I right-clicked again, selected Empty Trash, and again clicked the Trash button. [Edit: I meant the “Empty” button.] Then I closed the Pool.

Then the error message appeared:
When I tried to save, I got this error message: “The project could not be saved because the project is corrupt.” Cubase prevented me from saving the project by any other means.

What I tried:
So, holding my breath, I closed the project, re-opened it, and saved it under a new name. Fortunately, all the audio clips in the project that I’ve tested so far play back correctly.

But I have a new problem:
Now every time I re-open the project, I see a requester box listing about 130 files. It says “Resolve missing files”. Unfortunately, the missing files don’t seem to exist. To eliminate the unwanted requester box, I’ve tried repeating the above Pool procedure again, but it has not helped.

I don’t think this is a hardware issue, because my project is saved on a fairly recent Western Digital Caviar Black hard drive, which seems to be functioning well.

One suspicion I have:
I often re-draw wave forms in the Editor window, to remove audio glitches. After doing that, if I want to time-stretch the audio, Cubase requires that I make a new version of the file. I guess that creates multiple files of the same audio, and I wonder if Cubase is not handling those files correctly in its database. That’s just a guess.

My conclusion:
Apparently, Cubase’s file-name database was not properly updated when I emptied the trash in my original Pool procedure. So now it is referring to files that no longer exist. This has shaken my confidence in Cubase’s file management capability. I’m worried that Cubase might delete files that I actually need. This is a serious bug that Steinberg needs to fix asap.

I’m using Cubase 9.5.1 on Windows 8.1 with an Intel Skylake processor.