I believe I've found one of the things that causes this to happen. When one has the window left open after making a turn and the other players does their turns, the "it's your turn"-window pops up when it's gone the whole way round again. Then, when trying to attack the enemy stacks, they have the same fight order as they had when the players were using them - not the defend order. = "target has changed". When reloading window, it's no problem to attack, it's defend order and things work as they should. So an auto update to the page after clicking "ok" on the "it's your turn"-button would fix some of the "target has changed"-problems.
Edit:
But it's strange. It doesn't work every time, just some of the times.
Edit again:
Looks like it's only when it's units that are in view (of a unit, city, tower etc) and also changes some of the fight order during defend and attack. Also, if they enter boats or defense towers, it will be the same thing (most of the time).