I believe that McCain claimed to have been born either on a base or the Canal at the time was an American territory or protectorate. I don’t think it was never challenged in court, but if it was, his lawyers would also have claimed ‘Plaintiff has no standing’.
Doesn't matter. McCain's natural-born-ness is due to his parentage. He might as well have been born on the other side of the Moon, for all it matters.
As far as the Canal, if it was American soil, then any baby dropped on it was automatically American. If it wasn't, then not. How many Canal anchor babies are there?