Fix set and get of last_failure.