Nope, I've had the same problem. I'm attaching a save file from the point where it is possible to test this.
EDIT: Edited to include instructions.
1. Load save game.
2. Sign Defensive Pact with Germany.
3. End turn.
4. Notice that the game acts as if the player declared war. This doesn't happen if you don't sign a DP with Germany. Signing a DP caused forced declaration of war, even though none of the parties involved were at war.
Version 1.52, Game settings: Prince/Marathon/Standard Size Map/Terra
I have a defensive pact with the Persians and want to sign a defensive pact with Germany. Germany and the Incans have been warring most of the game, but right now they aren't at war. I should be able to sign a defensive pact with Freddy and only get drawn into war if he or Cyrus is attacked, right? And if anyone attacks either of them, triggering the defensive pact, then I'll keep the defensive pact with the victim nation but lose the pact with the other one. That's how it should work, but that isn't what happens at all.
From where the game is saved, I currently have only one defensive pact -- with Cyrus. If I simply hit end turn at this point, then everything plays as it should. If, however, I first sign a defensive pact with Freddy and then end the turn, the game tells me I declared war on the Incans (I didn't!) and cancels BOTH defensive pacts, as if I was the agressor against someone.
I don't know if it has anything to do with it, but I just entered anarchy -- changing from a war-time footing back to economy growth. Maybe this bug can only happen if you're in anarchy?
Also, I considered that it is possible that the Germans and Incans might have only declared a cease-fire instead of signed a peace treaty. The relations screen shows "Contact" as the relation between them. It does not show war. I even checked WB, but it doesn't recognize cease-fire. The only options in WB are peace or war. WB shows German/Incan relations as peace.
What I think may have happened is that they were in a cease-fire, which is actually a state of war. But since they weren't in "active" war, the game allowed me to sign a DP with Freddy. As soon as the turn ended, though, the game checked and saw that I had to declare war on the Incans. Why? Because I have a DP with Germany and Germany is at war with the Incans (cease-fire is War, not peace). So, the game mechanics cause me to declare war on the Incans, which is why I got the message that I had declared war although I hadn't. Then, since I "declared war" the game cancelled all current defensive pacts.
I would appreciate it if someone could check my savegame and see if that is the cause. I couldn't find any way to determine whether or not a cease-fire was in effect between Germany and the Incans. I'm hoping someone who knows the game code can figure it out.
http://www.civfanatics.net/uploads9/ThatsOdd.Civ4SavedGame