..F....... [ZBX-8302] backported code from trunk to fix sorting