nir/lower_io: Use the variable mode for load_scratch_base_ptr checks