This requires two fixes, both of which are derived from this answer: https://mods.factorio.com/mod/CircuitProcessing/discussion/5f3688a73b315081c5cd6d11
in data-fixes-final.lua, starting at line 225 reads:
  if r.normal then
    iset = {r.normal.ingredients, r.expensive.ingredients}
  else
    iset = {r.ingredients}
  end
Needs to be changed to something like:
  iset = {}
  if r.normal then
    table.insert(iset, r.normal.ingredients)
  end
  if r.expensive then
    table.insert(iset, r.expensive.ingredients)
  end
  if not (r.normal or r.expensive) then
    table.insert(iset, r.ingredients)
  end
Then, lib.lua, starting at line 48 reads:
  if recipe.normal then
    func(recipe.normal)
    func(recipe.expensive)
  else
    func(recipe)
  end
Needs to be changed to something like:
  if recipe.normal then
    func(recipe.normal)
  end
  if recipe.expensive then
    func(recipe.expensive)
  end
  if not (recipe.normal or recipe.expensive) then
    func(recipe)
  end
If you're using Circuit Processing, you'll have to apply the linked fix as well.
(I'm a bit of a Lua novice, so take it with a grain of salt)