fix recursion in compaction test