Ultimately, the only way to solve the problem is to disentangle the whole issue from the state.
I agree. This would also help those older folks who might want to marry in a church, but don't want their legal lives entangled. Their Social Security wouldn't be affected, nor would any tax matters.