Fix bug when serializing objects without a data manager.