Add some comments to make the shadier parts of set() more clear. Also
change behavior when adding sub values where a value already is set
(and is not an array).
More tests for set()