nsTemplateMatch* bestmatch = mConflictSet.GetMatchWithHighestPriority(matches);
Match* bestmatch = matches->FindMatchWithHighestPriority();
nsXULTemplateBuilder::FireNewlyMatchedRules(const nsClusterKeySet& aNewKeys){    // Iterate through newly added keys to determine which rules fired.    //    // XXXwaterson Unfortunately, this could also lead to retractions;    // e.g., (contaner ?a ^empty false) could become "unmatched". How    // to track those?    nsClusterKeySet::ConstIterator last = aNewKeys.Last();    for (nsClusterKeySet::ConstIterator key = aNewKeys.First(); key != last; ++key) {        nsConflictSet::MatchCluster* matches =            mConflictSet.GetMatchesForClusterKey(*key);        NS_ASSERTION(matches != nsnull, "no matched rules for new key");        if (! matches)            continue;        nsTemplateMatch* bestmatch =            mConflictSet.GetMatchWithHighestPriority(matches);        NS_ASSERTION(bestmatch != nsnull, "no matches in match set");        if (! bestmatch)            continue;        // If the new "bestmatch" is different from the last match,        // then we need to yank some content out and rebuild it.        const nsTemplateMatch* lastmatch = matches->mLastMatch;        if (bestmatch != lastmatch) {            ReplaceMatch(VALUE_TO_IRDFRESOURCE(key->mMemberValue), lastmatch, bestmatch);            // Remember the best match as the new "last" match            matches->mLastMatch = bestmatch;        }    }    return NS_OK;}