Defragmenter: avoid race condition