use current session in once and prepare

The once and prepare fields need to use the newly-created session,
otherwise when a query transformation is set on the session, it will not
be propagated to once and prepare.