Fix predictability of permission sorting