I have this issue, too. It looks like a bug to me.
In TabController.vb, around line 1270 in SerializeTab()... there is a line that operates on hTabs(objTab.ParentId). However, if the parent tab hasn't been processed yet (if it hasn't been added to the hTabs hashtable), then is throws a NullRefException. I changed the source code locally to look like this below, and it fixes the EXPORT. It's not efficient (but who cares for this feature, really), and I didn't put any thought into a better solution - but this fixes the EXPORT issue. But, this isn't the complete solution - while it does solve the EXPORT problem, on IMPORT, it didn't create my ADMIN tab on the new site when I created it from this template. So, there's more to it...but the root of the evil is somewhere in TabController.vb around line 1270-1280 where it operates on hTabs(objTab.ParentId). I will try to see why it didn't create my Admin menu.
'Manage Parent Tab
If hTabs IsNot Nothing Then
If Not Null.IsNull(objTab.ParentId) Then
newnode = xmlTab.CreateElement("parent")
Dim tabName As String = ""
If hTabs(objTab.ParentId) Is Nothing Then
Dim tabs As List(Of TabInfo)
tabs = TabController.GetPortalTabs(objPortal.PortalID, -999, True, True)
For Each t As TabInfo In tabs
If t.TabID = objTab.ParentId Then
tabName = t.TabName
Exit For
End If
Next
Else
tabName = HttpContext.Current.Server.HtmlEncode(hTabs(objTab.ParentId).ToString)
End If
newnode.InnerXml = tabName
nodeTab.AppendChild(newnode)
' save tab as: ParentTabName/CurrentTabName
hTabs.Add(objTab.TabID, tabName + "/" + objTab.TabName)
Else
' save tab as: CurrentTabName
hTabs.Add(objTab.TabID, objTab.TabName)
End If
End If