Partial revert of 0045eac0cb918e4b9ad234803143f35e1cfedbfb.

InferenceType comparisons really do need to be `==` and not identity `is`
Merge pull request #501 from oxtopus/bugifx-identity-comparison

Partial revert of 0045eac0cb918e4b9ad234803143f35e1cfedbfb.