di/instanceManager ignores call time parameters of array

relative #4714

InstanceManager::sharedInstancesWithParams with Hash based management ignores entries of array.This causes #4717.

This test seems to be a bit confusing. Can it be simplified just a bit?