Add legacy factories transformer.