Expand on cleanups in trans for expr_repeat and add to tests.