Fix EZP-20658: Wrongly redirected to mobile SA when booting the legacy kernel

JIRA issue: https://jira.ez.no/browse/EZP-20658

# Description

If the mobile redirector is enabled, the instantiation of the legacy kernel might generate a redirection depending on the user-agent.
This happens for instance when using the REST API v2 if the user agent string contains http and this is due to the introduction of the legacy IO handler that needs the legacy kernel to be instantiated.

# Tests

Manual tests