“Cases like these can be useful for lawyers doing risk analysis,” said Mark Dubois, an expert on attorney ethics.