[HLSL][DirectX] Avoid visited values when searching in `hasNonUniformIndex` (#189498)
This patch fixes `hasNonUniformIndex` search so that it accounts for any
path that connects nuri to index access to return true
fix: https://github.com/llvm/llvm-project/issues/189438
---------
Co-authored-by: Joao Saffran <jderezende@microsoft.com>