[Injector] Fix $name when no dependencies