the script is not confused tbh, it just does what you told it do... Sell items with those names.
The bird nest just have all the same names which make it annoying, I could add a "Loot all bird nests" task which you could queue before it which would open all of them.
But in the selling task there is no way to fix this