When Judge Smails walks in on Danny and Lacy, Danny gets up and removes the Judge's robe. You can clearly see Danny has an erection from lying on top of Lacy.
This is not a slipup. He was beig intimate with Lacey, and erections happen during intimacy. When Danny sneaks into the bathroom, Mrs. Smails even stares at his package. Definately not a slip up.