Fixes #2255

The cause was that there was a subclass of QueuItem (TxnQueueItem) that was serialized, but when deserializing
the deserialize method of the QueueItem was called. So the stream could corrupted because not all fields were
being read.