Conditionally reset AE context in keymat destroy