plist_set_key_val(): prevent setting a key value that already exists in a PLIST_DICT
diff --git a/src/plist.c b/src/plist.c
index 29dbfb7..6d7a07f 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -1067,6 +1067,11 @@
 
 PLIST_API void plist_set_key_val(plist_t node, const char *val)
 {
+    plist_t father = plist_get_parent(node);
+    plist_t item = plist_dict_get_item(father, val);
+    if (item) {
+        return;
+    }
     plist_set_element_val(node, PLIST_KEY, val, strlen(val));
 }