nir: improve out of bounds array access elimination
If vars_to_ssa exited early because it didn't think it had any work to do it would mean it didn't turn out-of-bounds array access it detected into undefs. Here we split out the code to replace the out-of-bounds access and make sure to always call it.
Should fix !18466 (comment 1541817)