When the alchemy recipe is picking items for the elixir, it picks them in the order displayed in the recipe. Generic ingredient then herb for herbal swill for example. I've frequently run into situations where the herb was the last item put in the inventory, so the generic ingredient slot picks the herb. Then my other non-herb ingredient (I notice this most often with lyed items) won't get highlighted because it's looking for an alchemical herb specifically.
If the recipes picked the category locked item first, this shouldn't happen anymore. For messy inventories it makes no difference since you have to select all the ingredients manually anyway.