Fix NPE for stateless local sessions.