This only fixes the problem when it's a fresh TL, there's still probably other issues with TL flushing.
Merge details
Closed #290 (closed)
I really wonder what we can do about this in the long run... it's a really hard problem.
merged
Rewrite timelines in a more FP and testable way