I don’t think it is related to the changes in item group tree.
I can check an error in your example code: eval:doc.item_group=="Fungicide"||eval:doc.item_group=="Insecticide"
This should be like below:
eval:((doc.item_group=="Fungicide") || (doc.item_group=="Insecticide"))