Riku has (or rather had) Vanitas' heart inside him. I know this doesn't sound all too appealing, but there are a few reasons why it adds up.
First, as I said in that topic, I think MX could have deduced that Ven's heart was connected to Sora. He wouldn't have attributed his recovery of the keyblade to some act of providence, I'm sure, and he could undoubtedly sense a change in Ven's heart as well. So, by connecting Vanitas to Riku's heart as Ven was to Sora's heart, he could ensure that the X-Blade could be created in the future should it fail the first time Ven and Vanitas tried to fuse.
But there's another reason why it fits, and it has to do with timing.
Check out this line of events:
1. Terra picks Riku to be his successor.
2. Terra goes to save Ven from Eraqus, transporting him on Destiny Island.
3. On Destiny Island, Ven meets Vanitas (who was there before him).
Question: What was Vanitas doing on Destiny Islands? Surely he couldn't have known that Terra would save Ven and transport him there. Vanitas had to be doing something. But what? Again, these events happen back-to-back. In other words, Vanitas went to Destiny Island directly after Terra chose Riku to wield the keyblade. Coincidence?
If Aqua could sense that Riku was chosen, so could Vanitas. And going back to the idea that MX and Vanitas knew about Sora's connection to Ven, I think Vanitas saw the perfect chance for his own fail safe back up plan.
I was always surprised at how Aqua noted that Riku's heart was filled with light. For some reason I thought he would be like Terra, naturally inclined to have a bit more darkness. Instead, he was light in the beginning, but Vanitas' darkness twisted him over the years, accounting for the change Kairi senses in him (hence why she tells Sora to never change). It also explains, obviously, Riku's dark suit. I know people chalk it up to being a coincidence, a rehashed design, but, really, there are only two occurrences of the suit in the series (Vanitas and Riku). Given Nomura's tendency for connections via physical appearances, there really ought to be some sort of reason for why the suits look so similar. And, after all, we already know that when Vanitas goes into another's heart, they aquire the suit- just look at Ven (in the scene where he has his armor on, but it melts into the dark suit). Riku's suit is slightly different for a potential variety of reasons, but I think that fits nicely.