Bug 917602 - Fix some shutdown crashes r=bent