[1.7.x] Fixed tuple serialization test.

Thanks to rockallite for the report.

Backport of f01d2a8f9be8bc2005b7f1620a2ca40530fb5065 from master.