I think commenting out that line causes some security issues. IIRC, without it users can edit random documents by setting the $_POST variable. That said, if the users have to be logged in and you know they're not malicious. It may be fine.
What's weird it that the first idea didn't work, since it removes that session variable. I'll have to look at the code again later.
I just gave it another go and deleted all /core/cache files before testing again but still no joy.
I thought I saw a reply from you where you suggested something about an ondocsave plugin being an alternative solution, but I can't see it now. Am I imagining things!