The legislature passes a law. The law is tested by the courts. The courts find a hole in the legislation and decide in favor of the defendant. The legislature immediately passes a bill rectifying the error.
Which is exactly what happened in Massachusetts.
When the legislature isn’t hopelessly gridlocked and the courts aren’t viewed as having political bias, it works.
Now, how about immigration reform?