Issue #2371875 by chx: Fixed session_manager can't be reasonably overridden.