Fixed a few more edge cases when serializing self-referencing/cross-referencing types. Running out of edge cases at this point! Gotta start writing unit tests.