avoid N^2 behaviour in block rebalance