scripts/metadata.pl: fix handling of multiple conditional depends on the same package