r300: Correctly scan for used temporary registers