Move the `lexer` option warning so that it is always correctly outputted

[see #1738]