Make trace and doctest play nice together (issue 1429818).  Backported from
head.
2 files changed