Make FileCache upgrade more robust, fixes #2650