Fix an edge case when we recurse too deeply.