This is wrong, on many platforms BLOCK_FACE_NONE could be 255. Compare for inequality instead.