Fix overriding starting/ending parts in common trace detection