Hi Bob,
With any upgrade script if there are new fields expected in code that do not yet exist until the upgrade scripts run it may throw errors but errors should redirect to the Setup page and that should run the scripts to correct the errors. You could manually navigate directly to the setup page and the code you posted should not be involved in the request.
The setup page itself does not use a master page so the code you posted will not happen when the setup page runs and therefore should not interfere with the upgrade process.
Hope that helps,
Joe