uVision Internal DLL Error when performing Flash erase

Whenever I perform a Flash Erase in uVision, more often than not, I get "Full Chip Erase Failed" followed by "Internal DLL Error".

I have two flash algorithms configured:

STM32F4xx_2MB (distributed with uVision)

SST39VF3201C_BOT (my own)

I suspect the SST device is the cause, but have no real evidence as uVision error message is not very helpful.

Both devices appear to have erased OK, but the error message suggests otherwise.

Any idea on the cause ?

I am using uVision V5.38 but have had this problem for a few years, with older versions.

Also it would be very useful if uVision would allow me to select which Flash device to erase.