Implement smarter algorithm for choosing which blocks to tail-merge.