I think a clue to Xehanort's identity lies is Riku's ordeal in Reversed/Rebirth.
In KH1, Riku turned his back on light to use the power of darkness. Then when the darkness was used to control him, he rejected the darkness in his heart as well. Having abandon most of the light and darkness in his heart, it left his heart practically empty. DiZ identified such a state of the heart as "Sleep". Supposedly, when the heart is in such a state, they are supposed to be empty and only capable of retaining dark memories. This was demonstrated by how all the memory worlds Riku ventured through being empty except for heartless and villains, thus all relating to dark memories. DiZ said, "Sleep is safety. Sleep is eternal" but Riku was able to deny slumber and retain his other memories on some level. Apparently, Riku avoided the full toll of "Sleep", but what would become of someone who experienced the full effects of this eternal "Sleep"?
That's where I think Terra comes into play. Already clear similarities can be drawn between Terra and Riku. Terra seems like he to will embrace darkness in BBS. And if Terra becomes desperate enough, he may have to abandon the light in his heart to embrace the full power of darkness. And then if the darkness threatens to take over... or if possessing darkness poses a danger to the safety of others, he may decide to reject darkness as well, thus by expelling both light and darkness from his heart, Terra's heart would become almost empty and be similar to the "Sleep" mentioned in Reverse/Rebirth.
Also, hearts in this "Sleep" as explained in Reverse/Rebirth, only retain dark memories. So if solely Terra becomes Xehanort, not only would this explain the memory loss, but it would explain every single similarity Xehanort has to his adversaries. Name and clothing of Master Xehanort, color scheme of the heart unlocker and Heartless Seal both resembling the Dark Soldier, readiness to use Maleficent in his plan... even why some of the Artificial Heartless are designed sort of similar to Unversed. All these could be subconscious influences of remnants of dark memories still present in Terra's heart.
And if "Sleep" provides a form of "safety" for the heart, could this be why Xehanort's heart wasn't overwhelmed with darkness and thus able to retain its sense of self? If the power of a Heartless' physical form is determined by the amount of darkness in an individual's heart, could Ansem SoD's lack of a potent physical form be a result of Xehanort's heart being practically empty and thus possessing too little darkness to produce a fitting physical form?