BUG: fix double bool compares not being set to 0x1

mask needs to be applied after all packing else the result is the
saturated values (127)
Merge pull request #4446 from juliantaylor/bool-fix

BUG: fix double bool compares not being set to 0x1