Fix build order issue related to service generation