Moving thread locks to avoid variable entaglement.

It is possible more than one thread starts the next link each, moved locks to prevent this.
refs #4751