Made upgrade.py test for #2696 compatibility.