This seems to be happening quite a lot lately. When it does, all formats disappear from the book, and there is just the metadata remaining. Since re-adding the formats does not work, I then delete the book and readd it. It then conflicts with another book.

This is most likely a legacy effect from your windows->linux syncing days. I suggest the following:

upgrade to latest release
select all books, click save to disk
then remove (delete/rename) your library folder and restart calibre
Use the add to library recursively on the folder you previously saved to