fixed #302 local optimizations now remove empty if-statements