In the first place, I loaded service definition (with separate XMLs) only if dependencies were satisfied. Then @stof told me to do it this way because "it avoids breaking other compiler passes trying to access the extension".