Request for conflicting packages is resolved randomly
If we have requests of same priority for conflicting packages then we choose one of those in random. In wost case scenario we could be constantly switching between those packages.
The solution is to add one additional parameter and that is order of introductions of requests. If request is introduced before some other request then we should prefer it. The implementation can be done using binary search algorithm to always assume first half of internal and if that is not possible then we can divide it and do the same recursively.