scripts/relay: check for dupes both ways