refactor(dynamic_injector): optimize for common case