Injecting the MetadataFactory instance instead of the Library.