Revert "Temporary batched replace change"

This reverts commit 2b075bf01f37e60a5e72c68c2ac4fe27ef2ff5e1.
Alternative hack-implementation which is hopefully more efficient.