Don't move twice when moving subpages to a subpage
(
bug 14817) When a page got moved to a subpage of itself, and "move
subpages" was checked, the page got moved, then moved again, like Foo ->
Foo/Bar -> Foo/Bar/Bar. There was an explicit check to prevent this,
but the check was incorrect: it used $ot->getArticleID() after $ot had
already been moved, so the ID was the redirect. The behavior of
getArticleID() here isn't obvious, so I cached the ID in advance for
clarity instead of switching to $nt->getArticleID().
Brief inspection of Title::moveSubpages() suggests that that would be
affected too. The third place we have this code copy-pasted (bleh) is
SpecialRenameuser, but that's not affected because usernames can't have
slashes in them.