Yeah, I see I was wrong about where those battles occur. I was looking at battles inside the keep. But there's one interesting glitch. If you sneak past the final set of gate guards, you trigger a script switch that erases the guards upon entering the area. So you can sneak past, sneak out, leave Titan Keep, come back, and they're all gone, never to return. The soldiers and the wretch slaves disappear too. All can be fixed by commenting out the switch checks, leaving, and reentering. At least, I hope all is fixed!
I'm still interested in whether there's a general code to reset an area. I thought I remembered that from the Avernum series.