def value_index(idx)
      node = self
      while node.parent
        idx += node.parent.offsets[node.index_in_parent_node]
        node = node.parent
      end

      idx
    end
def value_index(idx)
      node = self
      while node.parent
        idx += node.parent.offsets[node.index_in_parent_node]
        node = node.parent
      end

      idx
    end
Compute the array index of the value with the given index in the current
 node.
 @param idx [Integer] Index of the value in the current node
 @return [Integer] Array index of the value