When demoting the cook back to a farmer when the cook workshop has something in the queue you get the below engine error.
I also got a marginally different error in my late game save where I’d done the same; I think that this is the same error, just that I’d built one of the items in the queue.
Steps to reproduce:
Promote farmer to cook
Add something to queue
Demote Cook to Farmer
To save a bit of time I’ve uploaded both saves here:
Save 1 = New Game using the console to level up to reproduce (the cook is about to make the workshop)
Save 2 = End Game save; also in this save the traveller was approaching with a bundle more than once.