Added consistency check for comparer.