Both .icon and .icons are supported by the game, yet you check only for .icon in func.lua line 191. This causes a failure when you copy the icon & icon size over from the ingredient to the recipe, without setting .icons to nil, in case the size of the icons is less than the the new .icon_size.
Changing line 191 to
'if not recipe.icon and not recipe.icons then'
solves the issue.