Tighten up the AmbiguousReference check.