Two years ago Taiwanese semiconductor foundry United Microelectronics Corp. found itself in what we'll call an uncomfortable position.