[DependencyInjection] fixed management of scoped services with an invalid behavior set to null (closes #7636)