(Creating task retroactively for @Legoktm's existing Gerrit patch, per current CPT practices.)
This follows-up a security issue - T30798: Interface links can be redirected to hostile domains by cache poisoning on some server setups.
Removing this logic from the init path would also help with T189966: Audit and simplify MediaWiki initialisation code (Spring 2018).