[JBIDE-13319] removed fixed cartridge names when editing cartridges

backported fix from 4.0.x that avoids hard coded cartridge names when
checking cartridge dependencies that should also get added/removed