If the sequence presented as input to the
distinct-values() function contains two items that are
not comparable (e.g. a string and an integer) then a
ClassCastException may occur. This only happens if the
two values have the same Java hashCode. This is
infrequent but not impossible: for example the string
"2" has the same hashCode as the integer 50.
Source code fixed, test case added (qxmp141)