These `IF` guards are not needed.  If there are no ACLs the called templates will go trhough 0-iteration loops, which is the same but more readable.