Code refactoring in acl.c (bug 1184)