An easy way to reproduce is planning a factory with the Tiberium mod, with sludge byproducts enabled.
It has recipes that produce the main resouruces out of molten tiberium, with sludge as a byproduct.
But if you use sludge as a main input in a block above those resource recipes, the top most resource recipe (in a linked block) will try to satisfy all of the other sludge consumers, even if the blocks below it also produce sludge (also linked blocks).
Trying to put them all in a single block won't work either, since then only the top most recipe gets used, and the others don't supply THEIR main products at ALL.
A potential sollution: allow the player to define the block's main product. This is the primary product that the block is responsible for producing, and the linked block system will focus on that. You can have MORE than one main product. Any side products get added to the outputs, but don't define the factory numbers, even when in shortage.
Another bug I've spotted while testing this: after the planner tried to force the direct resource recipe supply all of the sludge byproduct the rest of my factory needed, it didn't respect when I disabled the linked block. I couldn't manually define an output value, I had to swap to 'calculate by factory' mode.