[DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)