The original instruction might get legalized and erased and expanded
into intermediate insts. An intermediate instruction might fail legalization and we would report failure on an erased inst. Instead now report failure on the first failing instruction
Use a forward declaration at this point.