Fix agent search in taskjoblogs. closes #2170