writer: add better test against flush overflows