If any part of this chapter is adjudged unconstitutional by the courts, and such adjudication has the effect of invalidating any payment of compensation under this chapter, the period intervening between the time the injury was sustained and the time of such adjudication shall not be computed as a part of the time prescribed by law for the commencement of any action against the employer in respect of such injury; but the amount of any compensation paid under this chapter on account of such injury shall be deducted from the amount of damages awarded in such action in respect of such injury.