Fixes to default 'id' field creation in Document metaclass