Fix the CnP error that means the alterMetadataFactory hook didn't work.