Fixes #2249 sessions unnecessarily being deleted and created on every request