Fixed error messages for RecursiveDo (#8501)