Fixed a unit test that didn't work correctly on linux.
Fixed bug where the searchreplace plugin would produce an exception on very specific multiple searches.