Changing diplomacy has no affect on the timers in wondermode, so when a wonder is build by one of your allies and you (or (s)he) declares war, you still win when the timer has run out....
Fixing this with equivalent behaviour as D972
Support teams for wonder just as relic victory has, however a wonder is always owned by a specific player thus setting that in the string.