fix new job preparation if some jobs are already prepared

The filtered agents list used to find already running jobs must be reset
on each items loop since a new item can pop up at any time.