I have a web application in 2007 that contains a bunch of sites that all used a custom site definition and a custom master page (deployed using a feature). All is well.
I've upgraded the code for 2010, changed the master page to add the ribbon and all that jazz, and do the database detach/reattach method to upgrade the content database for 2010. Everything is where I'd expect it to be and the custom master page is in the master page gallery (and when I view it in Designer it opens successfully and has the new look and feel, so it's definitely finding the right file).
The problem is, the site itself is using v4.master. If I use PowerShell to switch MasterUrl and CustomMasterUrl to my custom master page, everything works fine, but why would the upgrade process force it back to v4.master? There are thousands of sites in this web application, and I'd rather not have to run a powershell script after the upgrade that manually makes the change. Has anyone else tried to upgrade a site that uses a custom master page with the -preserveolduserexperience switch set to false and had a similar issue?