Make "for_each_ref()" always use the "canonical" refname.