I suppose it could also be other things such as a
buggy BIOS, or a drive
with issues...
Maybe. I don't understand why you have the problem anyway. What would be
the difference with a case where in an application you do a file
operation, then swap disk and then do another file operation?
The application would never know about the disk swap (unless
specifically programmed to monitor disk changes) so would never call any
specific API to flush any possibly existing cache or internal table or
whatever.
If you want I can try the same sequence of operations on a DOS PC here
and see if I can reproduce the problem. Would that be of any help?