Make nested insertions polymorphic

The first pass will append the nested content and collect up its length,
and store the length in a vector. The second pass will use the
information from the first pass to provide the necessarily information
for the length-delimited field.