Fix packed byte array length calculation.