Whenever any of the territory being served by a county free library is annexed to, or otherwise included within, any municipal corporation not served by the county free library, the board of supervisors of the county shall order the county free library to continue to serve the territory annexed to, or otherwise included within the municipality, until the end of the fiscal year or years for which a tax has been levied upon the property of the annexed territory for the support of the county free library.