Implement Session invalidate for -1 hits (bug #2696).