XCOMMONS-388: In some conditions upgrading the dependency of an invalid extension fail
* fix typo
* fix bug
(cherry picked from commit 6dfe8dbb7c3dce2c57b4dd8ce63c2362e48e79cc)