The fix for T124409: Logging out immediately logs you back in broke an unstated assumption that the session could always be re-loaded from the original request cookies, which makes the "was a session cookie provided?" check in LoginForm break, which makes it do an extra redirect after login, which makes CentralAuth not do its redirect dance with loginwiki.
This was never really guaranteed anyway, since some extension might have screwed around with the SessionMetadata and SessionCheckInfo hooks to violate the assumption, or some nonce might be valid only for the first load during the request. So the solution is probably to just save whether the session was persistent when it first gets loaded in Setup.php, and use that for the login cookie check instead.