Congress creates laws, the President signs them into law, and the Supreme Court has the power of judicial review. The catch is the court has limited capacity to review laws, cases have to go through lower courts first usually, and it has discretion of which cases it hears. The 1868 law might not have ever been challenged in 150 years, or the current judges may think that this particular case has a compelling argument to warrant another review (it happens). The Constitution does not specify that a law is beyond challenge after any period of time, so there is an infinite amount of time to do so. That's a good thing.