I've fixed this by applying a patch that has also been accepted by the upstream. obuild now sort the result of readdir calls.