Upon termination or partial termination of the retirement system or upon complete discontinuance of contributions under the retirement system, the rights of all affected members to the amounts credited to the members' accounts shall be nonforfeitable.