Fix if constant handling

Slightly more optimal if compilation, including a fix for always true/false constants (which was failing due to the strict comparison), and better handling of empty else.