CSHARP-840: A more general fix for $operators and stricter checking for when equality testing is implied.