Without seeing the rest of your pChat.buildOptionsTable function, I don't know what you're doing here. If all you're doing is changing entries in a dropdown menu, there is a much easier way to take care of this.
If you're actually adding/removing options widgets to your settings panel (which I believe is what katkat42 wants to do), then this shouldn't work after you've opened your panel for the first time and the options have been created.
- Open your pChat settings panel
- Have someone leave/join your guild
- Open your pChat settings panel again --> it will be the same as before because it's already been created