       when 'Events', 'DeviceID' then
         # Do nothing
       when 'Downloads'
-        if currentPath.length == 3 and currentPath.wildcard == 0 and declareAttributeValues.value?
+        if currentPath.length == 3 and currentPath.wildcard == 0 and declareAttributeValues?.value?
           if currentPath[2] == 'Download'
             syncState.downloadsDownload.set(currentPath, declareAttributeValues.value[0])
           else

              else
                syncState.refreshAttributes[attrName].add(currentPath)

          if declareAttributeValues.value?
            syncState.spv.set(currentPath, declareAttributeValues.value)

    for child of children


  allVirtualParameters = virtualParametersCache.get(sessionContext)

  mergeAttributeTimestamps = (p, attrs) ->
    if cur = allDeclareAttributeTimestamps.get(p)
      cur = Object.assign({}, cur)
      cur[k] = Math.max(v, cur[k] or 0) for k, v of attrs
      allDeclareAttributeTimestamps.set(p, cur)
    else
      allDeclareAttributeTimestamps.set(p, attrs)

  mergeAttributeValues = (p, attrs) ->
    if cur = allDeclareAttributeValues.get(p)
      cur = Object.assign({}, cur, attrs)
      allDeclareAttributeValues.set(p, cur)
    else
      allDeclareAttributeValues.set(p, attrs)

  for declaration, i in declarations
    path = common.addPathMeta(declaration[0])
    unpacked = null
