Under the projects build options add a custom variable to a target and wrongly enter "FOO=BAR" in the key field, leaving the value field empty, and press OK. Notice your error and edit the variable, enter key "FOO" and value "BAR". Switch to a different target, then switch back to this target.
There should be one variable with key "FOO" and value "BAR"
There are now two variables, displayed as:
FOO = BAR =
FOO = BAR
The xml looks like this:
<Variable name="FOO=BAR" value=""/>
<Variable name="FOO" value="BAR"/>
Any attempt to edit or delete the wrongly created variable fails, it always reappears after switching away and back to this target. The only way to correct this is to edit the project file manually. I had previously chosen OK and "dont annoy me" for the dialog asking whether to save unsaved changes when switching targets.
Fixed since rev10306.