i have a theory on this that i haven't seen anywhere else so i'm going to share it here to see what you guys think
during his fight with the DO (unless i misunderstood something) rand stood outside the pattern looking in and he had the ability to weave the pattern itself. could it be that when this was happening time had no meaning to rand (i think its said somewhere that time means nothing to the DO) so rand have saw the future and wove the pattern itself to directly change things that could be changed without causing unwanted side effects.
so in effect rand lit his pipe from the past while he was inside the pit of doom.
also Nakomi could be Rand's creation he wove into the past (and maybe future) as his own self righting mechanism.
i am truly sorry for the rambling nature of this text and i know i called it a theory at the beginning but reading it back i don't think it qualifies as one. i think "idea" fits it better