Bug 1077637 - Actually set the visited history correctly. r=kgrandon