Fix #2702, with a correct accounting of recursion.
2 files changed