Major bugfix for data-structures that contain their own types

The test I added failed before the code I added to fix it.

Looks like this is hitting scalding.