Fix regularization of singular Jacobian in Newton step