[RFC][WIP] Reduce code duplication between DI extensions