This happens because XWikiDocument#createXObject sets the content dirty.
removing a comment switches programming rights
Adding tags to a document change its content author
Annotation creation, and its effect on programming rights
Copying a document sets the creator to the current user
Add a script right to manage script macro execution permissions