Move comparer block to earlier in IsSameAs(), add test