Add recursivity support for ACL (fix #5053, fix #5550, fix #7276)