For some reason the 'water' entity created when using the water ammunition in the flamethrower was being added to an array in Lightorio which is used to automatically create the hidden lamps on miners. Since this entity only exists for a few ticks, when Lightorio attempted to access the array for that entity, the game would crash since the entity had already disappeared.
So now Lightorio does a sanity check that the entity is still valid first. If it's not valid, it skips any further logic and removes that element from the array.
It doesn't explain why the water entity was being added to the array only when a certain combination of mods are installed though.... But for now at least it works.