Remove redundant insert method in serialize.

Resolve clang compilation issues.