Our system is pretty complex with DML statements, call-outs and future methods everywhere. After adding some more functionality, I ran into the dreaded 'uncommitted work pending' error. It had been a while since I saw one of those. I just could not find out what DML caused this error. Attempts to recreate the error via a unit test were unsuccessful: they all run without errors.
Even after disabling all update and insert statements, I still get this error. It happens after the second call-out during a transaction. What is going on?