I am using Windows Vista. Further investigation reveals that the problem will not occur on Windows XP machines. We can live with that. We just won't use Vista for accounting.

It's as if some switch didn't get switched at the end of the process. Can this be fixed or do we have to revert to a backup? The problem didn't reveal itself for a while so significant work has been done since that backup. The data integrity check after running the function didn't reveal any problems so we kept going.