Apply offset before repetition (fixes #13)