ZEN-15858: Fix zenpack upgrade dependency logic