Remove the C built-in if function in favor of moving it into solcore
written in sol.
Surround function execution with try...finally to ensure scope
restoration.