Finish pending writes on prefinish event

Mimicks transform's _flush