NAND: fix first and last handling in nand_build_bbt