Fix bug that would throw an exception when compiling if expressions with complex conditions