r11636: a bit neater solution to the nt_cancel problem