Moving the session read lock code to decrease opportunities for false positives on PID checks (and possible race conditions?).