Hello,
Please send to contact[at]phpdocx.com these files: doc1.docx, doc2.docx and indice.docx
About updating a TOC, you can't force Word to update it (Word security block this kind of actions). You can ask Word to update the TOC when you open the document using this line:
$docx2->addTableContents(array('autoUpdate' => true), $legend);
but it will work only on some versions/installations of Word. You can use a macro as well.
Regards.