Could you show me one of these examples that use Clone()?
Even with the operations in the right order, making copies of nodes to fill in a repeating table is not a very good approach. qRules' Insert command uses a much more robust approach, and I suggest checking that out.
The below should work:
foreach (DataRow dRow in DS3.Tables[0].Rows)
{
xpnDataGroupGL.InsertAfter(xpnTemplateGL);
XPathNavigator xpnNewDataGL = xpnRootNodeGL.SelectSingleNode("my:ExpenseDetails/my:GLAccountsGroup[last()]", NamespaceManager);
xpnNewDataGL.SelectSingleNode("my:GLAccountRepeatingID", NamespaceManager).SetValue(dRow["epicor_account_code"].ToString());
xpnNewDataGL.SelectSingleNode("my:GLAccountRepeating", NamespaceManager).SetValue(dRow["epicor_account_code"].ToString() + "|" + dRow["epicor_account_description"].ToString());
xpnDataGroupGL = xpnNewDataGL;
}
xpnTemplateGL.DeleteSelf();