Fix prepared statements

Prepared statements were inadvertently broken in commit
b7935a1b79fa2dee944d4 by making stmt.Query() re-prepare the statement
every time.