Just one correction, it is sorting correctly when there's one workorder with a skill, if there's another workorder with same skill, it doesn't sort that workorder to that skill.
This is what is happening:
Workorder skill ABC1 ------------ Engineer skill ABC1
Workorder skill ABC2 ------------ Engineer skill ABC2
Workorder skill ABC1 ------------ Engineer skill ABC2
but if there's only one workorder with one skill it works:
Workorder skill ABC1 ------------ Engineer skill ABC1
Workorder skill ABC2 ------------ Engineer skill ABC2
Workorder skill ABC3 ------------ Engineer skill ABC3
so, from the second workorder on, with a repeated required skill, it doesn't sort properly