; and (II) in the case of a prosecution for an offense described in this paragraph for which a person was entitled to a jury trial in the jurisdiction in which the case was tried, either— (aa) the case was tried by a jury, or (bb) the person knowingly and intelligently waived the right to have the case tried by a jury, by guilty plea or otherwise. (ii) A person shall not be considered to have been convicted of such an offense for purposes of this chapter if the conviction has been expunged or set aside, or is an offense for which the person has been pardoned or has had civil rights restored (if the law of the applicable jurisdiction provides for the loss of civil rights under such an offense) unless the pardon, expungement, or restoration of civil rights expressly provides that the person may not ship, transport, possess, or receive firearms. . 4. Conforming amendments (a) Paragraphs (1)(B)(ii), (2), (4), and (5) of section 922(t) of title 18, United States Code, are each amended by striking receipt and all that follows through subsection (g) and inserting knowing sale or disposition of a firearm by the licensee to such other person, or the receipt of a firearm by such other person would violate subsection (d), (g), . (b) Section 923(d)(1)(B) of such title is amended by striking section 922(g) and (n) of this chapter and inserting subsection (g) or (n) of section 922, and is not a person to whom the knowing sale or disposition of a firearm or ammunition is prohibited by section 922(d) . (c) Section 925A of such title is amended in paragraph (2), by inserting and to whom the knowing sale or disposition of a firearm was not prohibited pursuant to subsection (d) of such section after section 922 . (d) Section 103 of the Brady Handgun Violence Prevention Act ( 34 U.S.C. 40901 ) is amended— (1) in subsection (e)(1)— (A) in subparagraph (A), by striking for whom and all that follows through subsection (g) and inserting to whom the knowing sale or disposition of a firearm, or for whom receipt of a firearm, would violate