Fix bug in 'sed' replacement expressions that caused doubling of existing values.