Fix a long-standing bug where `Linearizer`s could get stuck if a cancellation were to happen at the wrong time.