Incorrect results with (some) byte datatype masks.
Mask files are supposed to follow the logic that values of 0 (or NaN/NULL) are excluded and any other number marks a pixel that is to be included. Byte data type images behave differently; only pixel values that are equal to 1 are includes -- pixel values from 2 to 255 are excluded.