(a) The offense charged; or
(b) An offense based upon the same or some of the same facts or conduct which constitute the offense charged. 3. A witness who is an accomplice as defined in subdivision two is no less such because a prosecution or conviction of himself would be barred or precluded by some defense or exemption, such as infancy, immunity or previous prosecution, amounting to a collateral impediment to such a prosecution or conviction, not affecting the conclusion that such witness engaged in the conduct constituting the offense with the mental state required for the commission thereof.