off by one bit gx primitive mask error

Fixing up an off-by-one mask issue. This should address issue 7240