Fix complex metadata deserialization from MetadataModel