Fixed an ATE bug, added a unit test for user defined anonymous types.