Renamed shadowed names.
Optimization, do not check most specific, if size is 1.
Added special case for overloading resolution. When type arguments defined explicitly function with type argument is more specific than anything else. #SCL-6169 Fixed