my first thought as well, Bob.
I found a long while ago, that if you change the setwarnings in code, you have to change it back again in code, as the options option (if you will) no longer seems to have any effect.
For the OP - you have to be careful about error handling - if your normal code resets warnings, but you get an error, then your error handler needs to reset the setwarnings status also. Same thing if you break into code either with ctrl-break, or with a unhandled error. In the latter case, you need a little process to reset it, as Bob said.