These error conditions are checked after the phi node has been created, so we also need to delete it.