A modern court would very much likely overlook it for the same reason that many people looking at this chapter would overlook this. Judges are also humans. And history has proven a lot that some of them are not fit for the position, either for lack of intelligence, corruption or neglect.
That being said, it is not relevant for modern court in at least some countries as there are laws that automatically 'input' the proper clause into every contract. Others simply outright make any permanent contract invalid. A contract with no end date is simply unenforcable.
As for why I brought real world into this despite this being a magical enchantment is simple. It's written by a real world human. Moreover, going by the story, I can say with absolute certainty that it is a person that does NOT understand this principle. That is why the story has a logical flaw, whereas it should not. From the definition of 'contract', the ability to end it is automatically derived. Therefore 'contract magic' would instantly assume it, as it is the only logical outcome. Otherwise it would be enslavement magic, and those are two different things.