Only report error message when recursion depth is 0.