(a) General.-A resident beneficiary of a trust whose city adjusted gross income includes all or part of an accumulation distribution by such trust, as defined in section six hundred sixty-five of the internal revenue code, shall be allowed a credit against the tax otherwise due under this local law for all or a proportionate part of any tax paid by the trust under this local law for any preceding taxable year which would not have been payable if the trust had in fact made distributions to its beneficiaries