Fix incorrect replace when doing multi S&R and non-leading search expression matches