(1) A person commits the offense of unauthorized entry in a dwelling in the second degree if the person intentionally or knowingly enters unlawfully into a dwelling and another person was lawfully present in the dwelling.
(2) Unauthorized entry in a dwelling in the second degree is a class C felony.
(3) It shall be an affirmative defense that reduces this offense to a misdemeanor that, at the time of the unlawful entry:
(a) There was a social gathering of invited guests at the dwelling the defendant entered;
(b) The defendant intended to join the social gathering; and
(c) The defendant had no intent to commit any unlawful act other than the entry.