Restrict use-isnan violations to comparison operators.

Fixes #1535.
Should there be a `^` after `|`?