           if attrs = allDeclareAttributeValues.get(path)
             for attrName of attrs
               declareAttributeValues[attrName] = attrs[attrName]
+
+    if currentAttributes
+      leafParam = currentPath
+      leafIsObject = currentAttributes.object?[1]
+      if leafIsObject == 0
+        leafTimestamp = Math.max(leafTimestamp, currentAttributes.object[0])
+    else
+      leafTimestamp = Math.max(leafTimestamp, currentTimestamp)
 
     switch (if currentPath[0] != '*' then currentPath[0] else leafParam[0])
       when 'Reboot'


      if ((path.wildcard | path.alias) & ((1 << (path.length - 1)) - 1)) == 0
        parent = sessionData.deviceData.paths.add(parent)
        unpacked ?= device.unpack(sessionData.device, path)
        processInstances(sessionData, parent, unpacked, keys, minInstances, maxInstances)
      else
        parentsUnpacked = device.unpack(sessionData.deviceData, parent)

    if (path.alias | path.wildcard) & 1 or path[0] == 'FactoryReset'
      sessionData.deviceData.paths.add(['FactoryReset'])

    if path.alias
      aliasDecs = device.getAliasDeclarations(path, declaration[1] or 1)
      for ad in aliasDecs
