Reworked findFreeBlocks().