I always interpreted the theme park ending as a voodoo trick made by LeChuck. If they walk away from the last scene you see Chuckies eyes glow, which indicates that the spirit of LeChuck is present inside him.
I think this is also how the developers of MI:3 (TCoMI) saw it, since LeChuck says something like "I dont know how you escaped my Carnival of the Damned.." when he sees Guybrush float by in the bumper car. I wonder if Gilbert passed on that info on to the new developers of TCoMI or that they worked without any of his guidance.
Since Gilbert left though, it's been hard to determine what is actually "canon". What was added later is pretty much interpretation from other developers. I would like to get my hands on Gilbert's origional script for MI3 though