Make prepared query less magical

NO IDEA why this was working.  That should have done all sorts of
bad things.

We also need to handle the trxn_ids with or without a timestamp.

Change-Id: I994218ce022c4f4fcba0bac18f7735b7c1749923
Merge "Make prepared query less magical"