I think I could reproduce it finally. After a bit of poking around I
think the problem is related with stale data in the settings
file. When switching between configuration mehtods (dhcp, manual) and
then disable autoconnect the settings file gets out of sync.
The good news is, we don't need to read and update the config
file. Instead we can just write it everytime from scratch. I've posted
a couple of patches which change the save code path. So this should
fix the problem you reported.