Fix checking for invalid query enums.
Fix checking for invalid query enums.

Change-Id: I4cca0f1cf0cc2cd95502769d9653939d6999b8e1
Reviewed-on: https://swiftshader-review.googlesource.com/4507
Tested-by: Nicolas Capens <0612353e1fcebbfd4b302d9337447ca0cdfa9122@google.com>
Reviewed-by: Alexis Hétu <1c7141772178a7e80858c3db5052b328076f08f4@google.com>
Reviewed-by: Nicolas Capens <0612353e1fcebbfd4b302d9337447ca0cdfa9122@google.com>

bkaradzic/SwiftShader,google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,google/swiftshader,google/swiftshader