In a game where I was totally capturing enemy cities left and right (including capitals, so maybe that had something to do with it), one of my very first expansion cities, which had been connected to my capital for many, many turns, would keep see-sawing back and forth between receiving the "territory not connected to capital" penalty, and not. It was very weird. I'll try to look out for it to happen again next time I resume that game, is there a file I should grab if I see that message appearing when it shouldn't be?