I'd have to agree with posters above that if they just didn't feel comfortable with you at the wedding, that going the route of not inviting your spouse so you wouldn't go is a bizarrely aggressive, rude way to go about you not going to the wedding. If they weren't comfortable with you being there, why didn't they just say so? That is VERY passive aggressive and manipulative for folks who are supposedly very direct and say what's on their minds all the time, damn the consequences.
You are giving them too much credit for not being dicks. They behaved in a douchy manner - this is something to take note of for the future.
That said, weddings can drive people to make decisions and do things completely out of character. Where I am concerned for you is that this does not seem out of character for them.