Replace deprecated getPackedBlockIndex with getBlockIndex