nir_remove_dead_variables fixes
This fixes some problems where nir_remove_dead_variables
removes variables that are in use, just not directly.
This is needed for the D3D12 driver, where we (similar to Zink) need to track more type-information than for most other drivers.