Partial key restore on dict attack

Fixes: "Global key state not saved when dict attack fails partially"