Optimize example compiler for extending strings to not re-record repetitions.

Turns out just recording a single item of a repeat results in an equivalent, but smaller program.