Non strict type guessing is ambigious

It does not handle the case where two types get the same weight. I guess the best is to prefer the type which comes sooner in the array that provides the types for guessing.