typelib: Fix problem when serialize is overriden
typelib: Fix problem when serialize is overriden

Fixes a problem when the overriding serialize removes
attributes since they shall not be exposed over the
REST interface. Before this fix, they were removed in
the DB as well.

Combitech/codefarm,Combitech/codefarm,Combitech/codefarm