[DependencyInjection] Removed unreachable code