make sure that if we have no perfect match on reference, but one on exclude, we pick the exclude