I think there are three issues we should fix:
1. wrong indentation of 'continue'
2. currently, name is optional for service, but according to the
currrent logic, if a service doesn't have name attribute we will
select it anyway
3. we always loop all catalogs
Change-Id: I9fce66677affa396b6a12afea76e87cab9215a58