Fixed issue where incorrect cached filesize was reported when appending ...

...to file.

Backported 7b0e5d9375eef2cfd27335a2e62dda0b444a18b2 to 2.3 as it's a bug.