Properly handle session deletion (using their lock status).

Authored by intelfx on Sep 5 2012, 10:18 AM.