Handle ties more effectively

Previously we used min on the mro of the input types.  This caused
problems because min returns only one value when several minima might
exist.  To resolve this issue we created minset and used it.