Fix the scan to handle a last block with non-power-of-two size.