mesa: fix out of bounds array access in rtgc debug code