Skip to main content
1 of 2

Python 3, 98 bytes

lambda s,e=enumerate:[s[i-n:i]for i,n in e([9]+s)if all(m!=j+1for j,m in e(s[i-n:i-1]))and 0<n<=i]

Try it online!

Takes the input as a list and maps it to a list of lists where each item is a sublist of length n ending with item n for each item. Then it is filtered so that no list contains other valid length terminators.