Fix 3.6.* upgrade

Closes #1643