MDL-39177 File reference is not updated when overwriting the file