Fix disabling of invalid value checking on GPU.