Compare:
tex('%o1) $
$${\it \%o}_{1}$$
versus
tex('%i1) $
$$i_{1}$$
The output of the latter should be {\it \%i}_{1} or something equivalent. In the attached patch, the output is {\it {\%i}}_{1}, which is equivalent.
The source of the problem is in tex-stripdollar, which splits a symbol $%I[_0-9]+ into a list of strings ("$%I" ...). It interns the first string and creates a Maxima array $%I that it passes totex-array. Since $%I is %i, it's texed to produce i.
We need to add a test that catches this mistake and replaces the string "$%I" with something that will tex correctly. ("{%I}" works ). The attached patch does these things.
Attached is a comparison of pre- and post-patch
texoutput.