Deserialization issue

See 2e4bc5b6e1a6d5fb13c1974cd1d661d644299654 for failing test.
See 1d4a02978a6ac9e202b20cfe257f16678b7bf7eb for fix.