The update function is symmetric. The first time it's called, it cancels out the update done when the flow was added. The second time it's called, after the cookie is changed, it XORs the new cookie into the appropriate bucket and table checksum.