In a trial for possession of child pornography and for committing lewd acts with a child, the trial court erred in providing an amplifying instruction on an affirmative defense, but did not err in excluding evidence of the victims prior sexual exposure. The incidents the defense sought to introduce regarding the childs prior sexual activity were not similar to the charged crimes and thus had little or no relevance to the childs knowledge of particular sexual information at issue in the case. Further, defendant waived the particular theory of admissibility urged on appeal because he did not argue it in the trial court. However, the court erred in amplifying the affirmative defense to possession of child pornography outlined in Penal Code section 311.8 with language drawn from a case decided before section 311.8 was adopted. The affirmative defense in question relates to legitimate scientific or educational purposes for possessing child pornography, and the courts amplifying instruction added examples of situations in which the defense might or might not be available. The court of appeal held that the court erred in giving this instruction, but found the error harmless.