Fixed distinct-values and index-of to default to string value comparison for XSUntypedAtomic types
Minor clean up to make recent changes better readable
Minor optimization
Debug code wrapped into Debug statement
Added prototyped value property
Debug parameter and its usage wrapped into Debug statement