SAN FRANCISCO — Morrison & Foerster appears to have avoided getting the boot from the contentious trade secrets lawsuit between Uber and Waymo, Google’s driverless car division. But the law firm is also now on track to be one of the many characters at trial.

The result is an example of just how complicated things can get when a firm takes on different kinds of work for a single client. Although such arrangements can be lucrative and efficient, they also can get sticky in the context of litigation.