Added tests for serializing SetStatements.
Fixed bug in SetStatement (de)serialization.