Fix an infinite loop in factor_multivariate.

Make sure the leading coefficient is really factorized (take care of
the integer content).