So, as I played through that part, I noticed a parallel that could explain what happened better than "he did say anything could happen"
-First, how Riku regained his normal form:
The encoder's purpose was to "absorb" Xemnas' KH in the form of data; however, AtW miscalculated and KH couldn't be...