Add recursion loop detection in Service\Locator