When we ran into this problem it was related specifically to our htaccess file. If you had to open your permissions to install additional functionality you may have forgotten to clamp them back down. This is where I would look if you have this problem in the future.
Having it in the functions.php file is a much better option as it won’t be saved over when the core is updated.