One other thing: if i remeber right, in mplab ide you can chose to only overwrite the part of program memory you are actualy using... If looking at the ROM location counter on mplab i can see it actualy stops before location 0x7fff. I would asume it means it doesnt overwrite the entire ROM. If you do this, then wouldnt old code be left in the unwritten part of the ROM, thus making the senario i portrad earlier possible (the "random" goto thing). ofcourse it would be running parts of old code, and not random garbage, but the results could be the same.
Again .. just an idea. Please corect me if im wrong