Investigate hang when checking thread relationships

An strace of a nodejs process is causing the parser to hang when walking the thread map. It appears a pid has a reference to itself, causing an infinite loop.