Fix for non-pure singleton statements in ifs