Get your taxes done using TurboTax

A judge can never issue a legally binding order to do something illegal.  Even if your spouse was not remarried, the order would be unenforceable.  Unfortunately, neither your husband's attorney nor the judge seems to have been particularly well educated on tax matters.  You might want to consult your husband's attorney, and if you are really concerned, contact a tax attorney to write a letter supporting this position and pointing out to the ex's attorney that illegal orders are unenforceable.