Use a stack to search for recursive arguments