Add 2-fold/3-fold repetition fix created by joergoster.