fix #17445, add regression test for repeats