Ensure no registered error handler will see the 'reset' error

The current implementation in the default Lexer triggers a (suppressed) notice to force error_get_last() into a "known" default state. While that technically doesn't clear any error but rather "overwrites" whatever other error might have been on the stack, the current implementation conflicts with potentially registered strict error handlers where every error gets converted into an exception.

This PR fixes that by registering a temporary error handler before triggering the error, followed by a direct removal and thus restoring the previous handler.