diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index c6049d578..897ceeb32 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -827,6 +827,8 @@ class DataSmart(MutableMapping):
                 value = copy.copy(local_var[flag])
             elif flag == "_content" and "_defaultval" in local_var and not noweakdefault:
                 value = copy.copy(local_var["_defaultval"])
+            elif "_defaultval_flag_"+flag in local_var and not noweakdefault:
+                value = copy.copy(local_var["_defaultval_flag_"+flag])
 
 
         if flag == "_content" and local_var is not None and ":append" in local_var and not parsing:
diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py
index 2f6c6a005..dcc845dcd 100644
--- a/lib/bb/parse/ast.py
+++ b/lib/bb/parse/ast.py
@@ -151,8 +151,10 @@ class DataNode(AstNode):
                 bb.warn(key + " " + groupd[op] + " is not a recommended operator combination, please replace it.")
 
         flag = None
-        if 'flag' in groupd and groupd['flag'] is not None:
+        if 'flag' in groupd and groupd['flag'] is not None and not groupd["lazyques"]:
             flag = groupd['flag']
+        elif 'flag' in groupd and groupd['flag'] is not None and groupd["lazyques"]:
+            flag = "_defaultval_flag_"+groupd['flag']
         elif groupd["lazyques"]:
             flag = "_defaultval"
 
