Fix issue 311: NewtonSolver(solver, factory) does not work
Merge branch 'logg/fix-issue-311' into next