opj_t2_encode_packet(): avoid out of bound access of #1297, but likely not the proper fix