Tests that we don't crash when optimizing a second inner loop that
references a deleted instruction from the first one.
