data tree BUGFIX always use dynamic value

Fixes #1598
diff --git a/src/tree_data.c b/src/tree_data.c
index c864d7b..c7b7e53 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -824,7 +824,7 @@
 
     assert(ctx && name && name_len && format);
 
-    if (!value_len) {
+    if (!value_len && (!dynamic || !*dynamic)) {
         value = "";
     }