I had this issue as well on 3 different production servers, debugging the upgrade script pointed me out that there was a user database with logical name "master". Further investigation showed us that some inexperienced dbas had executed the database schema on the master database, created a backup and restored it under the what had to be the correct user database name.
Oh well, things happen.