a2dbdd6934
This should make it either add the variable if it's not present, or modify an existing one if it is -- avoiding an error in that case. Fixes issue #958.