I don't know, but according to the documentation:
XDocument.IsDirty: A read-only property that returns a Boolean value that indicates whether the data in a Microsoft Office InfoPath 2007 form has been modified since it was last saved. Read-only
So i bet i only changes when you change a field in the maindatasource.
Good thing there is a SetDirty:
XDocument.SetDirty(): Sets the IsDirty property on the XDocument object to a Boolean value that indicates whether the data in a Microsoft Office InfoPath 2007 form has been modified since it was last saved.
Albert