We were checking the prefix twice here, instead of checking prefix and suffix, which was obviously the intention. This caused extensions with non-matching architectures to be reported as related refs.