fixed tests to always pick two distinct links unless explicitly checking loops