Consider thread id for findPreviousNestedID()