fix job queue operation with FKs, RT#13971