Fix `DataSourceBuilder` so that the type used to access `deriveFrom` properties is based on the actual instance type rather than the user-defined type which could have been changed. Fixes gh-26644