OK, guess I'll have to dig into it more.
That looks identical to what I've tried, but I only get crashes.
Oh, I should probably add that I'm attempting to change the item from the Database.ObjectAppended event handler. Well, not exactly there, because attempting to edit it there would cause a crash. But I store the ObjectId of the newly-created MLeader in my event handler for Database.ObjectAppended, and then I try to access it in the DocumentManager.DocumentLockModeWillChange event handler. When I try to do that, the ObjectId is 0, and the UpgradeOpen fails.