DSMMeasure: removing singular dimensions before sending to dissimilarity function