Don't access dangling reference to reallocated IR.