The code works - the problem is it is relatively expensive (compile time) and gives little benefit.

Maybe we should have a optimizeToInfinityAndBeyond flag which enables code like this.