Sped up the algorithm for choosing the parameter specification to use when multiple are provided.