Reuse misc:nthreplace instead of introducing new function.

Change-Id: I302952579e684618f9ce02421f0d4bc0f5348f0b
Reviewed-on: http://review.couchbase.org/35744
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>