Replace case that was made invalid when error structs were exposed to conn.executeQuery for ErrUnprepared.
Add tests to ensure queries are re-prepared