When assertions are enabled, the below query produces an Assertion Error randomly.
When Assertions are disabled, we randomly get a wrong plan where we prune away things which we should not have pruned resulting in wrong results. Again this is random.
I attached the data and the stack trace when we got an assertion error. Let me know if you need something.