If a portion of the territory embraced in any district has been detached therefrom prior to the twenty-ninth day of July, 1927, either by annexation or incorporation proceedings, and the portion of the territory of such district remaining unannexed or unincorporated has been dissolved instead of continuing its existence as a lighting district, and thereafter moneys are paid into the fund of such district by reason of the collection of delinquent taxes or otherwise, such portion of the subsequent fund accretions, as was provided by law at the time of such annexation or incorporation, shall be paid to the city or cities within which the detached portion of such district was included. The remainder of such moneys shall be paid into the road fund of the road district within which the remaining unannexed or unincorporated portion of such district lay.