In case of multiple writes File() engine will set doNotWritePrefix(), and this will avoid serializations initilization, move this to do this always. Fixes: #31004