Only schedule tasks that are runnable.

On the road to #293.  Incidentally resolves #260.