Fixed serializing portable nested inside other types. Fixes #600.