I has a simialr problem within InfoPath 2007 Managed code. Code solution:
// Now Create a new row
// Find first Instance of repeat nodes and create entry before.
xNode = xNavigator.SelectSingleNode(''//History'', this.NamespaceManager);
string sNewRow = ...