In what scenario would the government need to compel you to make false statements?
The law is already that if you receive a NSL, then you are not allowed to divulge that you've received one. If you do, then you may be prosecuted for breaking the law.
In the scenario involving warrant canaries, the only difference between just outright saying you've received an NSL vs removing the canary is the reliance on some 'technical workaround' where the removal of information is not considered speech and/or doesn't divulge the information.
The judge is not going to tell you that you have to lie to keep the information up. But they may tell you that if you break the law, by divulging (through whatever means) that you have received an NSL, that you will receive the appropriate punishment.