Check call stack size before duplicate error.
Fix undefined line in syntax error message.