Improve performance of isEqual() by skipping Comparator Factory if possible.