This thread and something my dad told me made me start digging. He and my mom filed together for naturalization, but she qualified about a year and half before he did. The attorney they used missed it, and the IO missed it. It wasn't until oath day that it was caught. My dad said it was a mini-disaster. They stopped the ceremony, pulled him out of line to a room and started deliberating. My mom was terrified. It took them an hour to figure things out. My dad was early by like a month, so he had to wait. My mom declined to take the oath that day, so they did get to take the oath together. USCIS told him that it was ultimately his responsibility to make sure he was eligible.
This was the example my source used: a federal judge has the authority to perform an oath ceremony. If said judge took a few of his/her foreign-born friends and did a ceremony during a party, the ceremony is meaningless, unless these friends had met the lawful requirements AND were examined by USCIS prior).
Same applies to the notorious 10yr vs 2yr error. If an immigrant somehow naturalizes because they got a 10-yr green card in error (without doing the required ROC), the naturalization is void. Said person wouldn't be denaturalized, because they did not legally naturalize.