Fix error when `options.reportOnly` is set.