In regards to the bug I mentioned above with my custom summonable civ;
I made the following changes to CIV4TechInfos.xml:
-Removed the Ashen Veil as a prereq religion for Infernal Pact
-Set Infernal Pact to require 1 beaker.
I started a game, randomly assigned civ (it was the Kuriotates) and gave myself Corruption of Spirit via worldbuilder. I then started researching Infernal Pact after founding a city and fortifying my units. The next turn, I had to set my city to build something, speak with Hyborem (he appeared right next to me) and set a new technology to research. At that point, it offered me to flip to Hyborem, and I said yes.
The screenshot below is the result. As you can see, there's the same "terrain not being revealed/de-revealed correctly" problem, at least on my computer. I still don't know if this is just a problem on my computer or something wrong with the actual code- but now we have confirmation it isn't something wrong with onProjectBuilt.
A friend of mine had the same problem. Xien, you are welcome.