Remove call to make_db_current_silent in wp_upgrade. Custom upgrade handling should be written instead.