* Session locking - Fixed some problems with the reentrant lock.