See parent task
The use of $wgUser was added as part of T139665: "User::loadFromSession called before the end of Setup.php" warning due to Echo
However, that patch added a check for both $wgUser->isSafeToLoad() and $this->user->isSafeToLoad(). Only the second should be needed, since the user is the context user that would be loaded