Fix masking calculation in txbuf.