BZ-983528 - Removal of ksession does not work.

(cherry picked from commit 86f0117b23f7afe4bed06aa090d01ee2ad633f17)