PR 13471: Add cycle-detection during lex-abbrev expansion to raise appropriate syntax error.
Also add test cases for lex-abbrev cycle detection.
Correct the test case so it executes the error path we want.