Fix command generated when document is created
Don't create a command when the unit of the document is changed.
BUG: 387997 BUG: 388318