Second attempt to fix returning of NULL arrays from a provider

Now also with a test case. I haven't found any test suite which would register the provider and call EnumerateInstances on it, is there any?