Randoms are handled by the client not the script itself. Does it do this with dismiss randoms selected in the client or always, and do you happen to have a copy of the logger when this happens?
Do you happen to have a copy of the logger from when this happens? To hop worlds the script simply calls getWorlds().hopToP2PWorld(); and the client handles the rest so this looks like a client related problem.