fix subtle logic problem in block unpacker that leads to incorrect token