AsyncWriteEngine: fix deadlock in preallocation, see #275