[PATCH v2] kconfig: Clear "written" flag to avoid data loss