Fix Coverity issue 1212346

Coverity was (I believe) correctly complaining about a possible null
dereference during generic resolution.  I looked through the filterCandidates
call heirarchy and it struck me as possible (though very unlikely) for
control flow to reach that point when best was non-null but best->fn was.  To
fix, I added a check to best->fn to ensure it was non-null before the access
was performed.