Issue #3601300: Memory exhaustion when purging large activity tables; batch operations do not actually iterate
Closes #3601300