Workaround for BN_bn2mpi reading/writing out of bounds