The clarity of this logic helps us draw bright lines for Christian conduct in this less extreme but very important situation. Baking a cake is not evil. Telling someone that gay marriage is great is evil. Photographing a wedding is not evil. Implicitly endorsing public sin is evil. Signing a certificate as the government’s witness for the validity of the legal document saying two parties are married according to the state is not evil. Signing a certificate that certifies that all signatories endorse the government’s definition of marriage is evil.
So in the case of a cake for a gay wedding or being a witness on a slip of paper, it makes sense to analyze the act itself. It’s not wrong to give people a beautiful cake. It’s wrong to encourage people to do evil things. If you make your views and the company’s views clear, you can feel free to make that cake. If they want it to say “Congratulations Angela and Norma!” you may feel morally free to do as they wish. As long as they know that you are merely serving their own self-congratulations and are not participating in congratulating, your conscience can be clear.
Similarly, it is moral for a Christian clerk to issue the morally invalid marriage licenses that include gay marriages, as long as the state does not coerce the clerk into offering congratulations to the couple. Your function as a witness to the state and couple’s sin may be painful, but the angst of seeing neighbors fall deeper and deeper into sin should not be confused with the angst of personal moral guilt.