The script that builds the Pantheon of Camilla also builds some other buildings. This leads to amusing cases like below, where you can see a Trader+Market, and a Shrine of Camilla + Pantheon which is building #13, so on the next page. I also have the script-built foundry with a Metal Smith in queue. The game lets me upgrade the Market to an Agora.
In Pergamon, similarly I have a trader + scripted Great Agora, and there the game lets me upgrade the trader to a market.
In Halicarnassus I can upgrade my shrint of ares to a temple of ares, and it will stack with the Pantheon of Camilla (so you can get the XP bonus from the Pantheon, as well as the temple of ares).
This is probably because the script just builds the various buildings if there is no Pantheon of Camilla, letting you have dual markets, two blacksmiths, stack two temples (I think the other one has to be something besides camilla or you can't upgrade it though - Antioch cannot upgrade the shrine to a temple.)