Please read the WHOLE LIST OF COMMANDS I SENT in my test case.

I made the file writable in that list only to modify it. If you read the whole list of commands, you will see that I make it unwritable again before editing it with emacs. And that's exactly the problem... if the file isn't writable, emacs assumes that it's not checked out and not modified it and checks it out when you hit C-x v v, overwriting the changes in it.