fix(Doc): Reset private properties when Doc::affect() is called (closes #4875)