Fix random factory double replacement bug.