Fix serializing tuple types with getattr-style key access

[fixes #20]