I know it's not in your patch, but could you remove all these unnecessary restores as we use the sinon sandbox ?