[[ Bug 13626 ]] Prevent crash caused by static variable not being set to...

... nil before exit