Fixed the issue that `ServiceLocator` still returns the old component after calling `set()` with a new definition