This is based upon a misunderstanding of the original text. Glorfindel’s words to Eärnur in the aftermath of the Battle of Fornost were as follows:
“Do not pursue him! He will not return to these lands. Far off yet is his doom, and not by the hand of man will he fall.”
This does not say that he can’t be killed by man, but that he won’t be killed by man. Glorfindel is not saying that the Witch King has inherent powers which prevent him from being killed by men, but rather is making a prophesy about the future, where the Witch King is killed by a woman aided by a hobbit. As with all the best prophecies, it was vague and could only be fully understood once it has been fulfilled.
Most importantly we should note that it is the dagger Merry uses to stab the witch king right before Eowyn kills him. That dagger is from the barrow downs which were specifically crafted as repellants to the witch king during the second age. The dagger was imbued with magic that dispells the magic which keeps the Nazgûl in the spirit realm and allowed mortal weapons to harm them.
Most importantly we should note that it is the dagger Merry uses to stab the witch king right before Eowyn kills him. That dagger is from the barrow downs which were specifically crafted as repellants to the witch king during the second age. The dagger was imbued with magic that dispells the magic which keeps the Nazgûl in the spirit realm and allowed mortal weapons to harm them.
My boy JRR thought of everything.