Properly handle ended contexts that are not active