Fixed TraitDictionary.Contains to use Any() rather than Count() != 0.

This means it can bail early if a match is found.
Merge pull request #5402 from RoosterDragon/traitdictionary-contains

Fixed TraitDictionary.Contains to use Any() rather than Count() != 0.