@robwellis:

I guess you just to have unprotect all before the entire code is ran and protect afterward instead of doing it per method call because I think that's more likely what you were doing.