ops, I solved
I realized that the whole advanced condition must return a boolean true/false, so I specified the condition in the following way...
$name<>"A" and $name<>"B" and size[nestedPackages]>0
don't know if it is the best solution but it works...
thanks anyway!!!