mesa: fix instruction indexing bugs

We were looping over instructions but only looking at the 0th instruction's
opcode.

Fixes fd.o bug 27566.
1 file changed