Add serialization compat test
Fix Statement constructor