XCOMMONS-587: When upgrading an extension, backward dependencies are lost

(cherry picked from commit c229ddd5c147efe21e80b822921e791363bd5293)