How disappointing for you.
I make sure that everything is spread out on the tray so that it can dry out really well. You may need to use more than one tray. I keep checking on the tray and remove things as they dry out. It's very time consuming, but well worth the effort.
I made some recently, and your post has reminded me that I still need to add the dried peas, as the ones I had in my cupboard at the time were infested with weevils and I had to ditch them.