There is something that has been bothering me in God Emperor of Dune. When the new Duncan arrives and is taken to meet Leto II, Leto says: "When we climbed to Sietch Tabr for the last time together, you had my loyalty then and I had yours. Nothing of that has really changed". But Duncan didn't go to Tabr with Paul, only the first ghola went. Duncan died before Paul get to the Sietch. I don't understand that.
Herbert made several continuity errors in regards to the Duncan Idaho character. Herbert seems to have forgotten exactly when the character of Duncan died in the original novel, as well as confusing his back-story with that of Gurney Halleck on several occasions. Brian Herbert and Kevin J. Anderson's nuDune books retcon away several plot-holes, but they can't do anything about the major ones. You've found one of those major holes. It is simply a continuity error, without any in-universe explanation.
The same Duncan also remembers events which are clearly from Dune Messiah or even later:
Idaho remembered a strange child — twins, really: Leto and Ghanima, Paul’s children, the children of Chani, who had died delivering them.
Based on this, your quote and some other passages, I have assumed that this ghola is not based on the original Duncan Idaho but on his first ghola, which we meet in Dune Messiah and Children of Dune, and some other passages confirm this as well.
On the other hand, this ghola is also referred to being a ghola of the “original” Duncan Idaho at least once, which contradicts this.
It's been a while since I read the later books in the series so I apologise if this is incorrect but I was certain that in most cases, the Duncan ghola are from each successive iteration. This way, if treated correctly, they are ultimately able to remember everything. I think there is a mention that sometimes a ghola would be destroyed and a sample cannot be taken so that there are gaps in the later Duncans memories where that had happened.
Only the Idaho ghola from Heretics Of Dune & Chapterhouse Dune is explicitly stated to have the memories of his original pre-ghola life and the memories of any of his ghola lives. As it happens, he has the memories of all his ghola lives. None of the previous gholas are stated to have had anything other than the memories of their original pre-ghola life . . . except . . .
The problem with the main ghola in God Emperor Of Dune is that he appears to have both the memories of his original pre-ghola life and those of his first ghola incarnation (Hayt, from Dune Messiah & Children Of Dune). This is somewhat of a continuity-snarl because it seems to break some of the in-universe rules about ghola memory retrieval as established by that point in the saga, and in retrospect with reference to the Heretics/Chapterhouse ghola.
Herbert never explicitly states that gholas can't retrieve the memories of their previous ghola lives in any of the books up to & including God Emperor, but this seems to be the case by virtue of the fact that the Heretics/Chapterhouse ghola is stated to be the first to do so. Therefore, in retrospect it seems that in God Emperor Herbert is retroactively breaking or contradicting a rule he would later set, or is implying but not stating that for some reason all serial gholas can have their original pre-ghola memories and the memories of their first ghola incarnation restored, but not the memories of any ghola lives after their first revivification (at least, at this point in the saga). The other option is that Herbert was careless with the handling of established continuity from his own books, and the apparent possession of Hayt's memories by the God Emperor ghola is a mistake.
It is stated in Chapterhouse that the ghola in that book was grown using cells from most (but not all) of the previous serial gholas as well as the original pre-ghola, which implies that the God Emperor ghola could legitimately have the memories of his original pre-ghola life and the memories of Hayt if his body was grown using cells from both.
This seems to be the neatest in-universe solution, but then the question becomes: why not incorporate cells from all of the intervening gholas as well? Note that the main ghola in God Emperor has no memory of his immediate predecessor's life, as witnessed by his shock at meeting his predecessor's wife and child in the village that Nayla & Siona take him to. I personally think that the apparent possession of Hayt's memories by the God Emperor ghola is a (retrospective) mistake by Herbert.
Frank Herbert frequently plays on the voice of the story. Memory is not perfect. People of the time remember "House Washington" not the United States. And later voices remember previous voices as they would, imperfectly. Besides each Ghola, once awakened has a piece of the original inside. They are all Duncan Idaho. The autbor only claims omniscience.