Ensure task are scheduled before checking if there is some work to do, else it can occur that tasks are scheduled, but no check for work is triggered until the next task completes. Closes #8888.