Fix an issue in the mongo type driver with serializing MongoDB collections when using mixed document type references