job_compare return value is undefined in case the jobs have a loop between them, so better make a test to make sure transaction cycle detection catches it.