Refactoring kernel_died method to make subclass friendly.