bug 931156 - don't move under non-existent pages

Fixing https://bugzilla.mozilla.org/show_bug.cgi?id=931156#c6 part 2, which is the only part that blocks the feature.