Fix the initialization of lastState

There is however an error remaining (boost::optional data is
destroyed at some point, resulting in the impossibility to get
the last state of a SolverError. Investigation is in progress).