WYOMING, Mich. – Some union officials aren’t very smart.

Some are also quick to double-cross their members if it serves their self-interests.

Teachers in the Wyoming, Michigan school district are learning those lessons the hard way after union officials agreed to give up as much as $12,700 in annual salary for school employees in exchange for a contract clause that locks in mandatory union dues and fees, Michigan Capitol Confidential reports.

MORE NEWS: Know These Before Moving From Cyprus To The UK

But here’s the kicker: Those types of clauses are illegal under Michigan’s new right-to-work law for contracts that take effect after March 28, 2013.

Wyoming school and union officials crafted their latest deal before the deadline, but it didn’t take effect until Aug. 15, 2013, Matt Lewis, director of finance and human resources for Wyoming Public Schools, told Capitol Confidential.

That means school officials don’t think the clause is enforceable, and legal experts with the Mackinaw Center for Public Policy agree.

“The union security clause is valid but innocuous,” Lewis told the news site. “In other words, we are a closed shop, but the district cannot threaten termination of an employee who refuses to pay union dues.”

The legal reasoning is why school leaders in April refused to fire a bus driver who didn’t pay union dues or fees, which must have been a real bummer for union leaders who were banking on the contract clause to keep members in their fold.

The Kent County Education Association agreed to give up paid leave days and to cut the salary schedule by as much as $12,700 for some employees in exchange for the unenforceable contract language.

MORE NEWS: How to prepare for face-to-face classes

“This clearly shows that the union doesn’t care what is best for the teachers but what is best for the union,” according to Audrey Spalding, education policy director for the Mackinac Center, told Michigan Capitol Confidential. “They gave up thousands of dollars per employee for unenforceable language.”

The Wyoming district is only one of many in Michigan where union officials agreed to steep contract concessions for the ability to secure contracts with long union security clauses before right-to-work went into effect.

In January, a state labor judge ruled in favor of the Taylor Federation of Teachers in a lawsuit involving three teachers who believe a 10-year TFT union security clause added to their teacher’s contract shortly before right-to-work took effect is illegal.

In that case, the TFT agreed to an unprecedented 10 percent pay cut for school employees and other concessions in exchange for the guaranteed dues revenue.