Syntax error on invalid enum (#5600)