* Don't allow moving with subpages to a namespace that doesn't allow subpages. Such a move is only questionably reasonable, and even if reasonable it's not possible to revert it.
* Use a consistent test for whether a namespace permits subpages: empty(), not isset or boolean test with errors suppressed or a combination of those. The isset test alone (used in isSubpage()) is particularly broken because it returns true if the namespace is explicitly set to *not* allow namespaces, and only returns false if the entry is unset.
* Reshuffle some global declarations, simplify a conditional block