Better serialization of ASTs in tests.