Fix an error in the handling of factors for equivalent shifts values.