Ok, I'll try with #3410 and see where it takes me.

The last big change in optimize.c was 0215b469. A refactoring by yebblies to visitor patterns for Expression::optimize. I did glance at that commit, but did not investigate. So I started on that now... And yes, it looks a bit weird, with the reservation that I'm a complete noob at dmd-code :). In 0215b469~1 there seems to be shadowing of members e1 and e2.