TANAL-61: rewrite try-best-match logic, matches first on parameters, then on return type and lastly on declaring class.