https://bugs.openldap.org/show_bug.cgi?id=10280
--- Comment #2 from Howard Chu hyc@openldap.org --- (In reply to Ondřej Kuzník from comment #1)
dynlist reprocesses the filter to replace memberof=<value> based on what entries are members but this only happens once per <value>.
That was by design, this check https://git.openldap.org/openldap/openldap/-/blob/master/servers/slapd/overl... was to make sure we didn't expand the same value twice. Commenting that out is sufficient to make the example in this ticket work, but that opens the door to unbounded expansions, which could eat all of memory.