Converts a single-branch if expression immediately followed by return into a single return with an if expression as an argument.