3018
3019 - can't modify the trace while traversing it

Doing so sometimes causes corruption in the iterator, but I'm not gonna
bother debugging it.
3020 - check lines in multiple layers at once