Include the '.sty' and '.pdftex' files into the TeX code of the flattened document.
In the flattened version of the document, the paths of the figures included from an embedded TeX figures must be relative to the flattened TeX document.