Fix variable name collision
Merge pull request #422 from nlegoff/fix_upgrade

[3.8] Fix patch issue