Code fixes around ACLs and User Groups

See commits for details.