Fix scheduling bug which would skip some jobs.

The scheduling loop would only start even jobs because of an issue
where the internal array pointer was advanced twice per schedule loop.
This would not cause problems in small setups or setups in which jobs
did not rely on the output of other jobs, but could result in a
deadlock on some complex job setups.