[FIXED JENKINS-19736] Installing a plugin with optional dependencies doesn't upgrade the optional dependencies when needed