https://bugs.openldap.org/show_bug.cgi?id=7439
--- Comment #5 from Ondřej Kuzník ondra@mistotebe.net --- (In reply to Howard Chu from comment #4)
Right, rwm should probably stash the incoming filter and restore it on return.
The overlay seems quite confused in what it wants to do, parts of it want to maintain the original filter as is (rwm_callback_get, rwm_op_rollback) while parts are very intrusive (rwm_int_filter_map_rewrite).
I'll see if I can change how rwm_int_filter_map_rewrite mangles the op/its filter.