Now that I read this, I also remember another bug I hit (how many!) that only appeared randomly. I'm not solving with bruteforce by the way.
Basically, when calculating the equations and forming a matrix out of them, I had randomness in the row number they would appear. This does not influence the outcome theoretically, but can bite you the elimination process is not... careful enough.
So, you might want to try and balance
K2PtCl4 + PPh3 + KOH + C2H5OH -> PtP4Ph12 + KCl + CH3CHO + H2O a few times and see if any error comes out of it (by the way, please note that this reaction contains the same element repeated multiple times inside the same molecule).