Always check exit flag while processing yield()ed tasks. Fixes #720.