Upon termination of the retirement system, termination of employment of a substantial number of members which would constitute a partial termination of the retirement system, or complete discontinuance of contributions to the retirement system, the retirement allowance accrued to each member directly affected by such occurrence becomes fully vested and nonforfeitable to the extent funded.
§ 19-20-504, MCA