Resolves: fdo#84698 crash in autoreplacement

Change-Id: I44d5dacb21870f77ca993b24f3a31433edb17c6d