C#: Inconsistent equality