Had to change to __custom_marshal__ since __marshal__ would break the priority order in `#serialize`.