regression fix: problem with option replacement code

The change was very recent and a faulty version was never released.