(a) When a person pleads guilty to or is found guilty of a violation of subdivision (1), subsection (a), section nineteen, article sixteen, chapter eleven of this code; subsection (b), section nineteen, article sixteen, chapter eleven of this code; subsection (a), section twenty-two-a, article three of this chapter; subdivision (1), subsection (a), section twenty-four, article three-a of this chapter; subsection (b), section twenty-four, article three-a of this chapter; subsection (a) or (b), section twelve-a, article seven of this chapter; or subsection (a) or (b), section twenty-a, article eight of this chapter, the court, without entering a judgment of guilt and with the consent of the accused, may defer further proceedings and place him or her on probation upon terms and conditions it considers appropriate, if the person has not previously been convicted of:
(1) Any of the offenses contained in the code provisions referenced in this subsection; or