Any withdrawn contributor, who does not withdraw his or her contributions from the annuity savings fund, on again entering the membership as the result of reappointment or restoration to service, may be entitled to the service credit and status, including the reserve-for-increased-take-home-pay, to which he or she was entitled immediately prior to his or her withdrawal, except as provided in section 13-556 of this chapter, provided that he or she returns to membership within a period of seven school years following such withdrawal, and further provided, that he or she has not been absent from service for more than seven school years during any ten consecutive school years since he or she became a contributor of the retirement system, and further provided that in computing his or her average salary for retirement purposes only the earnable salary for years of actual service shall be used. At not time shall this section be so construed as to result in depriving a contributor of credit for substitute teaching service in the New York city public schools or for teaching service on other than an annual basis in the colleges under the city university of New York of the city of New York where such service was performed during the period between the contributor's withdrawal from membership in the teachers' retirement systems and his or her re-entry into membership.