Internal error: assertion failed: compare_expressions

I suggest filing a bug. Do not rely on the other thread that you linked. Although they appear similar, there appear to be important differences as well, according to my testing.