Hi,
   Here is a patch that fixes broken tangling during export. I don't have a simple reproduction, but was able to run git bisect to find the originating commit. The commit text explains the issue in detail. Best,
Tom