s4:dsdb/repl: Improve memory handling in replicated schema code