Avoid useless double-serialization. See #412.