(5) Where any pension or other allowance ceases or a gratuity is not paid by reason of this section it is lawful for the Governor General, with the concurrence of the appropriate service commission, at any time, and upon such terms and from such date (including any past date) as he or she thinks fit to restore, either in whole or in part, such pension or allowance or to direct the payment of such gratuity or any part thereof, but in determining whether arrears of such pension or allowance are payable and in computing the amount thereof and the amount of any gratuity, account shall be taken of all moneys paid or applied under subsection (3).