Fixes #22986 -- Conditionally enable the `Session` model.