Forward-port 3.1.4 upgrade script