This is a showstopper glitch in the game. It's actually very straightforward to do, and nothing can be done to stop it except a gentleman's agreement not to do it to other players.
Obviously you aren't supposed to be able to agree to any trade deal until -both- players have given their consent to its most recent contents. But in the multiplayer interface, if you set up a trade deal, propose the trade deal, and then open up the trade window again, you can accept the deal you yourself just proposed. Alternately, as Juice did, if you get a trade deal, you can alter the deal, propose it, then open it again and accept it.
Showstopper glitch. Fairly embarrassing obviously; it's not as bad as the research overflow exploit, because with that it's not even clear what counts as exploiting it.
So again, you get this to stop by telling your opponent "Stop doing that."