Schoolgirl caught masturbating by teacher