You don't deal with it, this is instead a not-too often case.
First of all, it is greatly discouraged
to have a sub-repo outside the directory, and that setup requires at least one outside sub-repo.
Second, even if you setup an outside repo, it is even less recommended to have more than one repo holding the reference to a single repo.
So yes, it is possible, but getting in that state is already hard to do, and if someone actually came to me with this, I'd tell him that he should rethink his configuration. There is a bad smell here anyway, and it is not mercurial's job to handle this.