BUG-1862: Incorrect type transformation in TypeProviderImpl