In good prose, it is better avoided. In technical/special/legal documents, however, "of" is often used twice in the same sentence, and I am talking about docs written by native English speakers,...