Fix acl resolution with multiple groups
Add a sorting method for acl resolution