Steps to reproduce: hover over batteries, sulfuric acid, sulfur, plastic, light oil cracking, petroleum gas or light oil -> solid fuel, or explosives in a chemical plant.
I have included the save "chemical-plant-problems.zip" that has one chemical plant with each recipe available for testing.
I see previous posts have mentioned this problem: see viewtopic.php?f=23&t=87716&p=505449&hil ... il#p505449 and viewtopic.php?f=23&t=87716&p=505447&hil ... il#p505447, and were closed as "not vanilla behavior", but I can confirm that this is happening in vanilla.
It looks to me like the common problem in these cases is that the game is not treating petroleum gas or light oil as a "terminal" raw ingredient and is instead trying to calculate the raw resources based on cracking these liquids from heavy oil.
I think that it would be better to calculate raw ingredients considering light oil and petroleum gas as "terminal" raw ingredients that are not further expended, because this is how these products are made in most cases. As it is these raw ingredient calculations are not really useful for planning appropriate ratios.
pics