Fix _validate_repeat; add passing test cases.