It could, but we'd have to add another file that would extend the class \phpbb\di\service_collection and add the wanted behavior.