Small improvement in ServiceLocator.as