Fix path-finding to locate (and enumerate) paths that require going
through the same resource twice.