Fixed 100% CPU spin on cancel scope misuse (#1217)