handle relative variable indices when printing ts expressions, too