I think it may be an icon generation problem when the source icon is composed
Very likely, yes. It's been a while since I made this, but I do generate icons dynamically for all the ore conversion recipes. Seems like I'm trying to pull an icon variable whereas whatever this object is only has an array of icons. The bigger question is why the mod is even trying to generate ore conversion recipes for... a biter nest object?
My logic for determining what is and isn't a resource is a bit roundabout, because Factorio has so many different ways to define those. I think the issue might be that I check for several excluding characteristics and let it through if it matches none of them. Could be Bob's biter nest thing doesn't match any of them, but still clearly isn't a resource. Do you happen to know which specific Bob's mod that's from? Or is it literally in the Library mod?