This should fix #8019.  It is now outputtting everything, instead of only what is not set to default.  This way things will be written correctly, regardless of the default settings.