correctly clear previous state when writer is reopened
(MultiResourceItemWriter usage)