#4137 Tidy interfaces for factory DI
#4137 fix build