I am having a lot of trouble nailing down when this happens and doesn't happen, and unfortunately
so far don't have a simple example I can share.
The problem is always in an equals comparison and occurs on the base language types like Object, String and null - here's an example where it claims it cannot compare two strings:

Here's another example where it can't compare something to null:

Sorry I don't yet have a reproducible example - it seems to be sporadic enough that I can't yet make a simple example of it. However I wanted to log this in case there's a way to fix it anyway, or if other people are encountering it.
I was encountering this using the stable release of 3.9.0 and now upgraded to the snapshot release of 4.0:

Both of them seem to have the same behaviour.