[mlir][x86] Fix result tracing through loops (#230229)
Fixes the search for the write of a contraction result in the AMX
lowering when the result is passed through loop args.
The value was followed to the wrong loop result, which either found the
wrong write or crashed when the loop has few results.
Assisted-by: Claude