fix the critical region of the LeafSegment#onPathTooLong