Fix test for 32BSI grayscale, and false negative return (#2298)