I think the problem is that the distance from the capital is determined by phase lanes, not by jumping through wormholes. Because the planet that has the problem is between 2 wormholes that have no connection to anything else, the distance to the capital is not calculable, so -1 is just put in its place. I could be wrong though.