issue #19800: don't assume session is there yet