Bit late to this party … but it cropped up in another thread.
Lambda / functions are not thread safe. I found out the hard way when working on my own thing-error-handling DSL code that Thing changes can come in very rapid succession, and need careful queuing. I’d be pretty sure this is a concurrency issue.
In my case I was forced to come up with a method of communicating from one rule to another. Using an Item is obvious - using a command maybe not as obvious, but does allow for really rapid fire data transfers that do not step on each others toes. Item state cannot be trusted as it is shared. openHABs own event bus manages queuing for us.
I would say to rewrite your function as a rule that works with incoming command to a shared String Item.
Rewrite your thing-change catcher rule(s) to send info as command.
More detail here -