Both native and green tasks can be queued, and it seems that libgreen will happily attempt to steal native tasks with catastrophic results.

But I think deschedule and/or libgreen should indeed handle this, and this code should indeed be removed once that's fixed.