Rewrite EditConfigValue() to not crash, yet be even harder to read.