Bug 6148 - problems mixing different storage engines in one session with prepared statements

Recover the current thd lex to the backup after the prepare statement processing.