If a local tax collecting unit has distributed taxes collected under this act to a local taxing unit or to the state treasurer, upon request by the local tax collecting unit, that local taxing unit or the state treasurer shall return to the local tax collecting unit an amount erroneously collected or an amount required to be returned by court order in a bankruptcy proceeding filed after December 31, 1999.